IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

change the o/p file of the sort during the run of the job


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
suresh1624

New User


Joined: 21 Nov 2007
Posts: 28
Location: chennai

PostPosted: Wed Sep 30, 2009 11:12 am
Reply with quote

I have a PS file1 where the name another PS file2 is written on a daily basis. Is there any way I can replace the file2 in the sortout during runtime?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Sep 30, 2009 11:23 am
Reply with quote

Not a very clear explanation, please try again.
Back to top
View user's profile Send private message
suresh1624

New User


Joined: 21 Nov 2007
Posts: 28
Location: chennai

PostPosted: Wed Sep 30, 2009 9:06 pm
Reply with quote

suresh1624 wrote:
I have a PS file1 where the name another PS file2 is written on a daily basis. Is there any way I can replace the file2 in the sortout during runtime?


FILEA -----> XXXX.YYYY.ZZZZ
the length of the file is 80.

The data in FILEA is AAAA.BBBB.CCCC which is name of a PS file.This file name can vary on a daily basis.

I need to copy contents of another FILEB to AAAA.BBBB.CCCC. How can i do that?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Sep 30, 2009 9:36 pm
Reply with quote

Hello,

Generate copy jcl using the dataset name in FILEA and send it thru the Internal Reader.

There are multiple examples of using the internal reader posted in the forum.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Sep 30, 2009 9:36 pm
Reply with quote

I think your best option is to handle it programatically. However, this is one possible option:

Code:

//STEP0001 EXEC PGM=SORT                                     
//SORTIN   DD   DISP=SHR,DSN=FILEA
//SORTOUT  DD   SYSOUT=(A,INTRDR)
//SYSOUT   DD   SYSOUT=*                                     
//SYSIN    DD   *                                           
  OPTION COPY                                               
  OUTFIL OUTREC=(C'//JOBB JOB (...),...,',/,                 
    C'//  MSGCLASS=X,MSGLEVEL=(1,1)',/,                     
    C'//STEP0001 EXEC PGM=SORT',/,                           
    C'//SORTIN   DD   DISP=SHR,DSN=FILEB',/,                 
    C'//SORTOUT  DD UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE),',/,   
    C'//         DISP=(,CATLG,DELETE),',/,                   
    C'//         DSN=',1,44,/,                               
    C'//SYSOUT   DD   SYSOUT=*',/,                           
    C'//SYSIN    DD   *',/,                                 
    C'  OPTION COPY',/,                                     
    C'/*',80:X)                                             
/*                                                           
Back to top
View user's profile Send private message
suresh1624

New User


Joined: 21 Nov 2007
Posts: 28
Location: chennai

PostPosted: Wed Sep 30, 2009 10:34 pm
Reply with quote

thanks a lot dick and superk for the suggestions.I ll try out these
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top