Page 1 of 1

Using the content of dataset like input in sort

PostPosted: Wed Dec 03, 2014 4:04 pm
by ottoelflaco
Hi,
First of all, sorry my english. I m trying the next:

I have a dataset DES.BDK.JCJCL10.STEP2 with the next content:

//SORTIN DD DSN=DES.DESBCJ.JURI.KON,DISP=SHR
//       DD DSN=DES.DESBCJ.JURI.KOZ,DISP=SHR



Could I use the content of the dataset in the input of SORT?. Something like this:

//SORT01T  EXEC PGM=SORT,REGION=2M,COND=(0,NE)             
//SYSOUT   DD SYSOUT=*                                     
//SYSPRINT DD SYSOUT=*                                     
// DD DSN=DES.BDK.JCJCL10.STEP2,DISP=SHR             
//SORTOUT  DD DSN=DES.BDK.JCJCL10.SORT01T,           
//            DISP=(,CATLG,CATLG),                         
//            SPACE=(TRK,(100,225),RLSE),                 
//            DCB=(RECFM=FB,LRECL=20431,BLKSIZE=0,DSORG=PS)
//SYSIN    DD *                                           
  SORT FIELDS=COPY                                         
//                                                         


Maybe I m doing something imposible. Excuse me, if my english is not OK..


Thank you.
Regards

Re: Using the content of dataset like input in sort

PostPosted: Wed Dec 03, 2014 4:10 pm
by BillyBoyo
No, you can't do that directly. You could use the content of the file as part of generating some JCL, which could then be either submitted or sent to the "internal reader" (INTRDR) to be run.

Re: Using the content of dataset like input in sort

PostPosted: Thu Dec 04, 2014 6:41 pm
by ottoelflaco
BillyBoyo, thank you for your answer.

Ok, I m going to search more information about you tell me

Re: Using the content of dataset like input in sort

PostPosted: Sun Dec 07, 2014 5:49 pm
by NicC
I am not entirely sure what you mean especially as there is a SORTIN DD statement missing in your sort step. However, if you are wanting to read in a dataset created in a previous step within the same execution then simply code it - you cannot have 2 datasets with the same name, unless one is uncatalogued and on a different device. If you want to read a temporary datasetname then use ther refer-back syntax ...
//SOMEDD dd DSN=*.previoustep.ddname
. You will have to check out that syntax as it is from a rusty part of my memory.