Using the content of dataset like input in sort



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Using the content of dataset like input in sort

Postby ottoelflaco » Wed Dec 03, 2014 4:04 pm

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
ottoelflaco
 
Posts: 36
Joined: Fri Sep 21, 2012 2:33 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Using the content of dataset like input in sort

Postby BillyBoyo » Wed Dec 03, 2014 4:10 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Using the content of dataset like input in sort

Postby ottoelflaco » Thu Dec 04, 2014 6:41 pm

BillyBoyo, thank you for your answer.

Ok, I m going to search more information about you tell me
ottoelflaco
 
Posts: 36
Joined: Fri Sep 21, 2012 2:33 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Using the content of dataset like input in sort

Postby NicC » Sun Dec 07, 2014 5:49 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post