|
View previous topic :: View next topic
|
| Author |
Message |
Aneesh
New User
Joined: 30 Sep 2006 Posts: 60
|
|
|
|
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 |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
 |
rakesh1155
New User
Joined: 21 Jan 2009 Posts: 84 Location: India
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|