Posted: Wed Sep 14, 2005 3:05 am Post subject: Insert and Copy in JCL
Hi all
I have an email id coming from online screen say abc@xyz.com which can vary everytime.
I will read that in my JCL and have to copy to another file as shown below.
RCPT TO:<abc@xyz.com> Basically I have to insert RCPT TO: < > in the output file while copying the email id.
Is there any way to insert text RCPT TO:< > while copying mail id. I am using IEBGENER to copy mail id.
I know I can do it by Rexx but we are trying to do it thru JCL only because of some compulsions.
Joined: 30 Aug 2005 Posts: 88 Topics: 3 Location: Syracuse,New york
Posted: Wed Sep 14, 2005 4:11 am Post subject:
I/P file:
abc@xyz.com 80 BYTES ( mail id in first 11 positions)
O/p file:
RCPT TO:<abc@xyz.com> 80 BYTES
Instead of iebgener go for sort
INREC FIELDS (C'RCPT TO:<',1,11,C'>',59X)
SORT FIELDS=COPY
This will work , when mail id length is constant. i hope it will vary
like "jbsfkhsjl@xyz.com".
This need to be worked out
INREC FIELDS (C'RCPT TO:<',1,2,CHANGE=(2,C'm ',C'm>'),
NOMATCH=(1,2), 3,2,CHANGE=(2,C'm ',C'm>'),
NOMATCH=(3,2),5,2,CHANGE=(2,C'm ',C'm>'),
NOMATCH=(5,2) and so on until it is 79,2,CHANGE=(2,C'm ',C'm>'),
NOMATCH=(79,2)).
this will change .com space ie mspace to m>
RCPT TO:<jbsfkhsjl@xyz.com>
For me this method is really . But sure this will work. Let's hope for better solution. _________________ Anil Sarathy
Thanks a lot Anil. It works fine. First approach you have suggested is fine for us because though email id varies the maximum size of email limit is 35. So we have hardcoded 35 in the INREC step.
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
Posted: Wed Sep 14, 2005 10:10 pm Post subject:
Prakash,
If your shop has file-aid then you can use the following jcl to get the desired results. You don't have to worry about the length of the email address.
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
Posted: Thu Sep 15, 2005 7:41 am Post subject:
Prakash,
If I were you , I would modiy the program that creates the email address. You can check for the length using the function reverse and simply add the beginning/ending tags. Check the application programming forum examples.
Hint: search for "length" in the application programming forum.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum