View previous topic :: View next topic
|
Author |
Message |
Vandana S
New User
Joined: 17 Dec 2007 Posts: 20 Location: Mumbai
|
|
|
|
I have a sort card as follows:
Code: |
//SYSIN DD*
OPTION COPY
INCLUDE COND=(5,100,SS,EQ,C'LAB')
/*
|
Can the character LAB be made dynamic; can we pass parameters for the constant via JCL? is there any way to acheive this? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use DFSORT's JPn function to do this kind of thing. For example:
Code: |
// SET INP1='LAB'
//STEP0001 EXEC PGM=SORT,
// PARM='JP1"&INP1"'
//SYSOUT DD SYSOUT=*
//SYMNOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
INCLUDE COND=(5,100,SS,EQ,JP1)
/*
|
For complete information on using the JPn function, see:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242 |
|
Back to top |
|
|
Vandana S
New User
Joined: 17 Dec 2007 Posts: 20 Location: Mumbai
|
|
|
|
Thanks for the reply and sorry for the late response. However, I get the following error. PLease help.
OPTION COPY,VLSCMP
INCLUDE COND=(5,24568,SS,EQ,JP1)
*
WER131I PARM FIELD ERROR - JP1"LAB"
WER253A INCLUDE/OMIT FORMATS INCOMPATIBLE
Note that the input files are of the format VB, hence the usage of VLSCMP. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
That is because you have Syncsort. You posted in the wrong forum. Consult your Syncsort documentation for possibilities of passing parameters or start thinking again of what youwant to actually achieve and how to do it.
Edit: Can you show your JCL please? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you post your complete JCL and sort control statements along with ALL of the messages generated by the problem run (using the Code tag). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Follow on:
One way to do what you want would be to have a simple bit of code that would use the PARM and generate the INCLUDE statement - like:
Code: |
//STEP1 EXEC PGM=yourboc,
// PARM='"&INP1"' |
would create:
Code: |
OPTION COPY
INCLUDE COND=(5,100,SS,EQ,'JP1') |
in a dataset (possibly a member in some utility pds) and the sort execution SYSIN would look like
Code: |
//SYSIN DD DSN=MY.INCLUDE(MBR) |
The dataset name and member name would be of your choice, following your site standards. |
|
Back to top |
|
|
Vandana S
New User
Joined: 17 Dec 2007 Posts: 20 Location: Mumbai
|
|
|
|
Pasting the JCL below: This gives the error as mentioned previously. Kindly help.
Code: |
//PP334D JOB (@@WOY@@@,PU),'PCA*COB*DISCL',
// MSGCLASS=Q,REGION=0M,CLASS=2,NOTIFY=&SYSUID
//*
// SET INP1='LAB'
//FTPSRUN EXEC PGM=SORT,PARM='JP1"&INP1"'
//SYSIN DD *
OPTION COPY,VLSCMP
INCLUDE COND=(5,24568,SS,EQ,JP1)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=IMS07PR.IMSI07B.DFSOLP00,DISP=SHR
//* DD DSN=IMS07PR.IMSI07B.DFSOLP01,DISP=SHR
//SORTOUT DD DSN=WOYTOTS.AK339.IMSLOG.DFSORT,
// DISP=(NEW,CATLG,CATLG),
// RECFM=VB,LRECL=24572,
// SPACE=(CYL,(40,10),RLSE)
//* |
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
and the JCL error is ??????????
Please show output from job.
Gerry |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Vandana S wrote: |
Pasting the JCL below: This gives the error as mentioned previously. Kindly help.
/
Code: |
/PP334D JOB (@@WOY@@@,PU),'PCA*COB*DISCL',
// MSGCLASS=Q,REGION=0M,CLASS=2,NOTIFY=&SYSUID
//*
// SET INP1='LAB'
//FTPSRUN EXEC PGM=SORT,PARM='JP1"&INP1"'
//SYSIN DD *
OPTION COPY,VLSCMP
INCLUDE COND=(5,24568,SS,EQ,JP1)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=IMS07PR.IMSI07B.DFSOLP00,DISP=SHR
//* DD DSN=IMS07PR.IMSI07B.DFSOLP01,DISP=SHR
//SORTOUT DD DSN=WOYTOTS.AK339.IMSLOG.DFSORT,
// DISP=(NEW,CATLG,CATLG),
// RECFM=VB,LRECL=24572,
// SPACE=(CYL,(40,10),RLSE)
//* |
|
Please use code tags... It makes the code more readable. |
|
Back to top |
|
|
Vandana S
New User
Joined: 17 Dec 2007 Posts: 20 Location: Mumbai
|
|
|
|
The error I get is (Repeating this for your convenience)
OPTION COPY,VLSCMP
INCLUDE COND=(5,24568,SS,EQ,JP1)
*
WER131I PARM FIELD ERROR - JP1"LAB"
WER253A INCLUDE/OMIT FORMATS INCOMPATIBLE |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
that's not a JCL error but a parameter error
Gerry |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I'm fairly sure that SYNCSORT does not support symbolic parameters,
ie the function is not available in SYNCSORT.
Gerry |
|
Back to top |
|
|
Vandana S
New User
Joined: 17 Dec 2007 Posts: 20 Location: Mumbai
|
|
|
|
gcicchet wrote: |
Hi,
I'm fairly sure that SYNCSORT does not support symbolic parameters,
ie the function is not available in SYNCSORT.
Gerry |
Is there any other way to acheive this ? I wanted the parameter to be passed dynamically.. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
The message you are getting is saying that you have passed a parameter that SyncSort does not understand as one of its own, so it looks like you can't do it that way. Your JP1 in the INCLUDE is just left as that, and is therefore invalid.
It would look like your best bet is along the lines of what Dick has already suggested. A small program to take the parameter. I'd suggest you then generate a card for a SYMNAME dataset, so you'd generate something like this from your small program, onto a sequential dataset (can be a member of a PDS):
Code: |
Dynamic-Include-Value,C'place the parameter here in your program' |
Which should then appear, in your dataset, as:
Code: |
Dynamic-Include-Value,C'LAB' |
Then in the Sort step
Code: |
//SYMNAMES DD DSN=your dsn
//SYMNOUT DD SYSOUT=* |
The INCLUDE becomes:
Code: |
INCLUDE COND=(5,24568,SS,EQ,Dynamic-Include-Value) |
Try the following so that you understand how the sort will then work. Tested with DFSORT on with fileds for SYSIN data, you can test with your actual file and the original 5,some big number...
Code: |
//STEPDYN EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
Dynamic-Include-Value,C'LAB'
//SORTIN DD *
TEST WITH LAB
TEST WITHOUT
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,80,SS,EQ,Dynamic-Include-Value)
//*
|
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I'm not sure about SYNCSORT FOR Z/OS 1.4 release however, till SYNCSORT FOR Z/OS 1.3.2.2R symbolic parameters support is not available - Gerry, AFAIK. |
|
Back to top |
|
|
Vandana S
New User
Joined: 17 Dec 2007 Posts: 20 Location: Mumbai
|
|
|
|
Bill Woodger wrote: |
Code: |
//STEPDYN EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
Dynamic-Include-Value,C'LAB'
//SORTIN DD *
TEST WITH LAB
TEST WITHOUT
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,80,SS,EQ,Dynamic-Include-Value)
//*
|
|
Thanks a lot for your help. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Check out also what Anuj has said. What version of Syncsort are you on? If an old one, is there any chance you get an upgrade soon? If a current one, hit the documentation. We missed all this earlier, while thinking it was a DFSORT question. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
what would be wrong in looking at the frigging manual Yourself ?!
forums are not a manual reading service...
parameter passing is explained quite well in the DFSORT manuals/documentation
I do not see any reason why it should not be explained ( if the facility exists ) in the SYNCSORT manuals/documentation
SYNCSORT manuals/documentation is available only to licensed customers
so we cannot do anything about it.
speak to Your support to have the manuals made available |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you consider the alternative i posted previously - write a bit of code to take in the PARM and generate the SORT control as shown.
My previous post had a typo (missing quotes) and i've changed this |
|
Back to top |
|
|
snammi
New User
Joined: 18 Mar 2009 Posts: 11 Location: Bangalore
|
|
|
|
Hi,
Even I am facing similar error with slightly different verbiage. Please find the error message below. Can any one help me to resolve it?
Code: |
*
OPTION COPY
INCLUDE COND=(QUOTE_ID,EQ,JP1)
DATA DICTIONARY SYMBOLS SUBSTITUTED :
OPTION COPY
INCLUDE COND=(53,8,CH,EQ,JP1)
*
WER131I PARM FIELD ERROR - JP1"9552
WER268A INCLUDE STATEMENT : SYNTAX ERROR |
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Tailgating is not good - neither at office-doors nor in threads. However, this thread is relatively new but you are not the OP. Said all that garbage, the same answer still goes well:
Quote: |
I'm not sure about SYNCSORT FOR Z/OS 1.4 release however, till SYNCSORT FOR Z/OS 1.3.2.2R symbolic parameters support is not available |
So what release of SyncSort are you at? |
|
Back to top |
|
|
snammi
New User
Joined: 18 Mar 2009 Posts: 11 Location: Bangalore
|
|
|
|
I followed the alternative suggested by Bill Woodger and it fetched me the desired output.
Thank you! |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Thanks for coming back and posting what worked for you.
Have a good one, |
|
Back to top |
|
|
|