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
 
Dynamic SORTIN for sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Aneesh

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Tue Mar 09, 2010 10:16 pm    Post subject: Dynamic SORTIN for sort
Reply with quote

Hi,

I have a dataset that has been created dynamically from an FTP listing to merge files that were created by the FTP step. The contents of the dataset is like:
//SORTIN DD DISP=SHR,DSN=TEST.WK.FILE1.DAT
// DD DISP=SHR,DSN=TEST.WK.FILE2.DAT
// DD DISP=SHR,DSN=TEST.WK.FILE3.DAT
// DD DISP=SHR,DSN=TEST.WK.FILE4.DAT

Is it possible to use this dataset directly as input to another sort card so that the sortin is replaced by the contents of the dataset rather than the dataset itself? Basically, is there a way to override the SORTIN dataset with the contents of the dataset instead of the dataset.

(Is there an option other than to save this dataset as a PDS member and use INCLUDE option in the jcl)

Thanks,
Aneesh.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Mar 09, 2010 11:52 pm    Post subject:
Reply with quote

It's difficult to understand what you're trying to do from your description.

If you have a data set that contain JCL statements and you want to include those JCL statements in a job to be executed, you could copy the JCL statements to the internal reader as part of a job to be executed.
Back to top
View user's profile Send private message
rakesh1155

New User


Joined: 21 Jan 2009
Posts: 84
Location: India

PostPosted: Wed Mar 10, 2010 2:24 pm    Post subject: Reply to: Dynamic SORTIN for sort
Reply with quote

Aneesh,
I dont know if the content of the datset can be used as the SORTIN


But, here is one way to do what you need:

DATASET1 contains the SORTIN DD statement:
//SORTIN DD DISP=SHR,DSN=TEST.WK.FILE1.DAT
// DD DISP=SHR,DSN=TEST.WK.FILE2.DAT
// DD DISP=SHR,DSN=TEST.WK.FILE3.DAT
// DD DISP=SHR,DSN=TEST.WK.FILE4.DAT

Code a dataset DATASET2 which is coded to have the SORT JCL excluding the SORTIN statement
//AZAZ11SS JOB (SORTSTEP),'SORT',CLASS=2,MSGCLASS=X,NOTIFY=&SYSUID,
// TIME=NOLIMIT
//*
//PS06 EXEC PGM=SORT
//SORTOUT DD DSN=TEST.WK.DAT.OUT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*


And follow the below 2 steps:
Step1: APPEND DATASET1 onto DATSET2
Step2: Execute the DATASET2 using INTRDR

I think there should be a simpler way out there.

-Thanks,
Rakesh.
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 -> DFSORT/ICETOOL 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 JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

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