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 

Copy the contents of file2 - file2 is in file1

 
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
sushma4satya
Beginner


Joined: 04 Nov 2005
Posts: 14
Topics: 4

PostPosted: Fri Feb 09, 2007 10:48 pm    Post subject: Copy the contents of file2 - file2 is in file1 Reply with quote

1)I have file1 : TESTGHN.H0307.LISTC.OUTPUT.T1
The contents of the file1 looks as below

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
LISTC -
ENTRIES ('TESTETN.MR.PLNH0307.YM200702.D08.TRWEEKD')
----------------------------------------------------------------------------------------

2) I want to copy the contents of file2 ,ie : TESTETN.MR.PLNH0307.YM200702.D08.TRWEEKD which is in file1 to some output file .

Can you help me with the above requirement.

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


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

PostPosted: Sat Feb 10, 2007 11:11 am    Post subject: Reply with quote

sushma4satya,

The easiest way would be to generate another COPY statement for repro which ever program is generating the LISTC entries.

Assuming that the input file always has the file name in line 2 , here is a Job which will create a Job to copy that file to another dsn. Run this job and check the output and if everything looks good then route it to INTRDR which will submit the job.


Code:

//STEP0100 EXEC PGM=SORT                             
//SYSOUT    DD SYSOUT=*                               
//SORTIN    DD *                                     
LISTC -                                               
ENTRIES ('TESTETN.MR.PLNH0307.YM200702.D08.TRWEEKD') 
//SORTOUT   DD SYSOUT=*                               
//*SORTOUT   DD SYSOUT=(*,INTRDR),RECFM=FB             
//SYSIN     DD *                                     
//SYSIN     DD *                                             
 SORT FIELDS=COPY                                           
 ALTSEQ CODE=(7D40,4D40,5D40)                               
 OUTREC FIELDS=(01,80,TRAN=ALTSEQ)                           
 OUTFIL STARTREC=2,ENDREC=2,                                 
 OUTREC=(C'//TUSERIDZ JOB ''',C'CREATE DSN''',C',CLASS=A,',/,
         C'//',13X,C'MSGCLASS=Y,MSGLEVEL=(1,1),',/,         
         C'//',13X,C'NOTIFY=&SYSUID',/,                     
         C'//*',/,                                           
         C'//STEP010  EXEC PGM=SORT',/,                     
         C'//SYSOUT   DD SYSOUT=*',/,                       
         C'//SORTIN   DD DISP=SHR,DSN=',11,44,/,             
         C'//SORTOUT  DD DSN=YOUR OUTPUT DSN,',/,           
         C'//            DISP=(NEW,CATLG,DELETE),',/,       
         C'//            UNIT=SYSDA,',/,                     
         C'//            SPACE=(CYL,(X,Y),RLSE)',/,         
         C'//SYSIN    DD *',/,                               
         C'  SORT FIELDS=COPY',/,                           
         C'//*',80:X)                                       
/*                 


Hope this helps...

Cheers

Kolusu

PS : Please do NOT Seek help via Private Messages. Please Post all your questions on the helpboard itself.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sushma4satya
Beginner


Joined: 04 Nov 2005
Posts: 14
Topics: 4

PostPosted: Mon Feb 12, 2007 8:46 pm    Post subject: Reply with quote

It worked perfectly. thanks much.

Can you explain me in detail the below 2 statements

ALTSEQ CODE=(7D40,4D40,5D40)
OUTREC FIELDS=(01,80,TRAN=ALTSEQ)


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


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

PostPosted: Mon Feb 12, 2007 9:16 pm    Post subject: Reply with quote

sushma4satya,


Check this link which explains in detail about ALTSEQ code

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/3.4?DT=20050222160456

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
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