Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: change the o/p file of the sort during the run of the job
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: 8593
Location: Back in jolly old England

PostPosted: Wed Sep 30, 2009 11:23 am    Post subject:
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    Post subject: Re: change the o/p file of the sort during the run of the jo
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

Site Director


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

PostPosted: Wed Sep 30, 2009 9:36 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Sep 30, 2009 9:36 pm    Post subject: Reply to: change the o/p file of the sort during the run of
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us