Page 1 of 2
control a sort parm value from JCL/Proc step - Syncsort
Posted:
Thu Aug 16, 2012 11:01 am
by rajinfy123
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.
Re: control a sort parm value from JCL/Proc step
Posted:
Thu Aug 16, 2012 11:06 am
by BillyBoyo
You have Syncsort not DFSort. Syncsort does not have JPn.
Re: control a sort parm value from JCL/Proc step - Syncsort
Posted:
Thu Aug 16, 2012 7:54 pm
by dick scherrer
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.
Re: control a sort parm value from JCL/Proc step - Syncsort
Posted:
Thu Aug 16, 2012 11:34 pm
by rajinfy123
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.
Re: control a sort parm value from JCL/Proc step - Syncsort
Posted:
Fri Aug 17, 2012 12:24 am
by dick scherrer
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.
Re: control a sort parm value from JCL/Proc step - Syncsort
Posted:
Fri Aug 17, 2012 12:39 am
by rajinfy123
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"®ION"'
//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..
Re: control a sort parm value from JCL/Proc step - Syncsort
Posted:
Fri Aug 17, 2012 1:55 am
by dick scherrer
Hello,
How many high-level qualifiers need to be supported?
Re: control a sort parm value from JCL/Proc step - Syncsort
Posted:
Fri Aug 17, 2012 2:17 am
by rajinfy123
Only one high-level qualifier
Re: control a sort parm value from JCL/Proc step - Syncsort
Posted:
Fri Aug 17, 2012 2:28 am
by dick scherrer
Hello,
I believe i asked the question poorly. . .
How many other than TEST?
Re: control a sort parm value from JCL/Proc step - Syncsort
Posted:
Fri Aug 17, 2012 2:41 am
by rajinfy123
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>