MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Insert and Copy in JCL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
PRAKASH
Beginner


Joined: 07 Mar 2004
Posts: 10
Topics: 5

PostPosted: Wed Sep 14, 2005 3:05 am    Post subject: Insert and Copy in JCL Reply with quote

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.

Help me out.

Thanks.
Back to top
View user's profile Send private message
ANIL SARATHY
Beginner


Joined: 30 Aug 2005
Posts: 88
Topics: 3
Location: Syracuse,New york

PostPosted: Wed Sep 14, 2005 3:35 am    Post subject: Reply with quote

can u give input file content

and how it should come in output file
_________________
Anil Sarathy
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
PRAKASH
Beginner


Joined: 07 Mar 2004
Posts: 10
Topics: 5

PostPosted: Wed Sep 14, 2005 3:40 am    Post subject: Reply with quote

Hi
Input file contains only email id - abc@xyz.com
Output file should contain:- RCPT TO:<abc@xyz.com> ie we have to insert RCPT TO:< >
Thanks.
Back to top
View user's profile Send private message
ANIL SARATHY
Beginner


Joined: 30 Aug 2005
Posts: 88
Topics: 3
Location: Syracuse,New york

PostPosted: Wed Sep 14, 2005 4:11 am    Post subject: Reply with quote

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 Rolling Eyes . But sure this will work. Let's hope for better solution.
_________________
Anil Sarathy
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
PRAKASH
Beginner


Joined: 07 Mar 2004
Posts: 10
Topics: 5

PostPosted: Wed Sep 14, 2005 5:01 am    Post subject: Reply with quote

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.

Thanks once again for your quick reply.

Prakash
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Wed Sep 14, 2005 10:10 pm    Post subject: Reply with quote

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.

Code:

//*****************************************************
//*THIS STEP POPULATES THE RCTP TO :< IN THE 1ST BYTE *
//*****************************************************
//STEP0100 EXEC PGM=FILEAID,REGION=0M                     
//SYSPRINT DD SYSOUT=*                                   
//DD01     DD *                                           
ABCD1@ABC.COM                                             
ABCD12345@ABC.COM                                         
ABCD12@ABC.COM                                           
ABCD1234@ABC.COM                                         
ABCD123@ABC.COM                                           
DKGDFKHGD@ABC.COM                                         
MMMMMMMMMMMMMMMM@MAIL.COM                                 
//DD01O    DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//SYSIN    DD *                                           
$$DD01 COPY MOVE=(1,C'RCPT TO:<'),MOVE=(+0,72,1)         
/*
//*****************************************************
//*THIS STEP CHANGES .COM TO .COM>                    *
//*****************************************************
//STEP0200 EXEC PGM=FILEAID,REGION=0M                     
//SYSPRINT DD SYSOUT=*                                   
//DD01     DD DSN=&T1,DISP=OLD                           
//DD01O    DD SYSOUT=*                                   
//SYSIN    DD *                                           
$$DD01 COPY REPLALL=(1,0,C'.COM',C'.COM>')               
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Thu Sep 15, 2005 4:21 am    Post subject: Reply with quote

Ah, but is it always ".COM"? Wink
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 699
Topics: 63
Location: USA

PostPosted: Thu Sep 15, 2005 4:31 am    Post subject: Reply with quote

Also, had my name been 'Mr Diba Com' then my official email id would have been "diba.com@mycompany.com".

I would probably put '>' in column 80 and strip all blank spaces.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Thu Sep 15, 2005 7:41 am    Post subject: Reply with quote

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.

Thanks

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group