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

Dynamic SORTIN for sort


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Tue Mar 09, 2010 11:52 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top