Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us