control a sort parm value from JCL/Proc step



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

control a sort parm value from JCL/Proc step

Postby jawaharsmg » Thu Sep 29, 2011 7:57 pm

Hi,
I am trying to control a value being passed to a sort parm thru the JCL/ PROC step like below

//STEP020 EXEC PGM=SORT,PARM=5000
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=PMSD.NVS.PMSDDV40.PROCESS.SORTED,DISP=SHR
//FILE1 DD SYSOUT=*
//FILE2 DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=(FILE1,FILE2),SPLIT1R=PARM

Can you pls advise if this possible..The reason here is we are planning to customize the parm and reuse it in a couple of jobs and also would need to control this variable and avoid having to change the parms everytime.

thanks
Jawahar Hussain
jawaharsmg
 
Posts: 16
Joined: Tue Feb 16, 2010 8:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: control a sort parm value from JCL/Proc step

 

Re: control a sort parm value from JCL/Proc step

Postby BillyBoyo » Thu Sep 29, 2011 8:04 pm

You can't do parameter substitution in the JCL for DD * data.

Have a look at the sort documentation, including the "sort tricks" to see if you can find something suitable. If not, come back here and tell us what you have found.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: control a sort parm value from JCL/Proc step

Postby skolusu » Thu Sep 29, 2011 9:31 pm

jawaharsmg,

Add a step above your split step which will take your parm and generate the dynamic sysin OUTFIL with SPLIT1R number. Use that sysin in your next. The following DFSORT JCL will give you the desired results.

//   SET SPLIT1R='5000'                                   
//STEP010  EXEC PGM=SORT,PARM='JP1"&SPLIT1R"'             
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD *                                           
//SORTOUT  DD DSN=&&S1,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)
//SYSIN    DD *                                           
  SORT FIELDS=COPY                                         
  OUTFIL REMOVECC,NODETAIL,                               
  HEADER1=(3:'OPTION COPY',/,                             
           3:'OUTFIL FNAMES=(FILE1,FILE2),SPLIT1R=',JP1)   
//*
//STEP020  EXEC PGM=SORT,PARM=5000
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=PMSD.NVS.PMSDDV40.PROCESS.SORTED,DISP=SHR
//FILE1    DD SYSOUT=*
//FILE2    DD SYSOUT=*
//SYSIN    DD DSN=&&S1,DISP=SHR
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post