control a sort parm value from JCL/Proc step - Syncsort



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

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

Postby dick scherrer » Fri Aug 17, 2012 2:56 am

Hello,

Then you might try this:
  HEADER1=(3:'SELECT * FROM',/,     
/*
//      DD DSN=some.pds(&REGION),DISP=SHR,
//      DD *                           
           3:'FOR FETCH ONLY WITH UR;')


The pds member(s) would contain:
          3:'TEST.EMPLOYEE',/, 

or whatever other regions this expands to. Each time a new region is added, a new member would be added to the pds.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby rajinfy123 » Fri Aug 17, 2012 8:35 am

Thank you Sherrer for that solution, but wanted to know if there is any better way of doing this just like how it is coded thru DFSORT i.e how I coded in my sample.

Thanks,
Raj.
rajinfy123
 
Posts: 6
Joined: Fri Apr 24, 2009 4:01 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Fri Aug 17, 2012 9:00 am

Hello,

Until you get to z/OS 1.13 you cannot replace symbolic parameters in the "data" and i've not yet heard if Syncsort will implement JPn in the next upgrade. . .

One "better" way might be to use a program and accept the region via a parm and have the program write the output you want.

If a utility will directly do what you want, it is usually recommended to use the utility. If the desired solution is not available, best to move on to a supportable solution.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby Alissa Margulies » Fri Aug 17, 2012 7:59 pm

You can try the following:

//STEP1  EXEC PGM=SORT   
//SYMNAMES DD *                         
JP1,C'TEST'                             
//SYSOUT   DD SYSOUT=*                 
//SORTIN   DD *                         
//SORTOUT  DD SYSOUT=*                 
//SYSIN    DD *                         
  SORT FIELDS=COPY                     
  OUTFIL REMOVECC,NODETAIL,             
  HEADER1=(3:'SELECT * FROM',/,         
           3:JP1,'.EMPLOYEE',/,         
           3:'FOR FETCH ONLY WITH UR;')
/*         

This way, you just need to modify the character string in the SYMNAMES DD statement.

Regards,
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Previous

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post