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



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

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

Postby rajinfy123 » Thu Aug 16, 2012 11:01 am

Hi Kolusu,
I tried your sample code it encounters below error. Let me know if I miss interpreted any..

SYNCSORT FOR Z/OS  1.4.0.1R
SYSIN :                                                 
  SORT FIELDS=COPY                                       
  OUTFIL REMOVECC,NODETAIL,                             
  HEADER1=(3:'OPTION COPY',/,                           
           3:'OUTFIL FNAMES=(FILE1,FILE2),SPLIT1R=',JP1)
                                                    *   
WER131I  PARM FIELD ERROR - JP1"5000                     
WER268A  OUTFIL STATEMENT  : SYNTAX ERROR               
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000           
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE           


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

Postby BillyBoyo » Thu Aug 16, 2012 11:06 am

You have Syncsort not DFSort. Syncsort does not have JPn.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

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

Postby dick scherrer » Thu Aug 16, 2012 7:54 pm

Hello and welcome to the forum,

Syncsort does support SPLIT1R. . .

If you show a bit of sample input data and the output you want when this data is used, someone may have a sugestion.
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 » Thu Aug 16, 2012 11:34 pm

What I was looking to accomplish was, I like to build & execute SQL Query on run time for different regions,i.e query remains the same but just changing the Highlevel qualifier. I like to pass the value for "xxxx" thru SET in the JCL. This can be achieved thru DFSORT by using OUTFIL & JPn but unable to find a solution using SYNSORT since my current shop uses "SYNCSORT FOR Z/OS 1.4.0.1RI".

SELECT * FROM xxxx.EMPLOYEE

let me know if it is still unclear

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 12:24 am

Hello,

It will help if you post more complete info. What is the jcl you intend to submit (please include all of the jcl, sort control statements, and explain what should be the output of your front-end process.
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 12:39 am

Thank you Scherrer
ok, more info..

Below code would have worked if my shop would have had DFSORT. Pls let me know how it needs to be tweaked for SYNCSORT..

// SET REGION='TEST'                           
//*
//STEP1    EXEC PGM=SORT,PARM='JP1"&REGION"'   
//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;')       
//*                                           


OUTPUT:
SELECT * FROM
TEST.EMPLOYEE
FOR FETCH ONLY WITH UR;


Pls let me know if this info helps..

Thanks in advance..
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 1:55 am

Hello,

How many high-level qualifiers need to be supported?
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 2:17 am

Only one high-level qualifier
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 2:28 am

Hello,

I believe i asked the question poorly. . .

How many other than TEST?
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 2:41 am

That is fine..
But there is only one high-level qualifier to the table name. High-level qualifier is the variable field:
i.e TEST.<TABLE-NAME>
rajinfy123
 
Posts: 6
Joined: Fri Apr 24, 2009 4:01 am
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post