IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can we pass parameters to SYNCSORT ??


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vandana S

New User


Joined: 17 Dec 2007
Posts: 20
Location: Mumbai

PostPosted: Mon Jan 02, 2012 5:19 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jan 03, 2012 5:39 am
Reply with quote

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
View user's profile Send private message
Vandana S

New User


Joined: 17 Dec 2007
Posts: 20
Location: Mumbai

PostPosted: Fri Jan 06, 2012 6:22 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jan 06, 2012 6:37 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 06, 2012 8:58 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 06, 2012 9:23 pm
Reply with quote

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
View user's profile Send private message
Vandana S

New User


Joined: 17 Dec 2007
Posts: 20
Location: Mumbai

PostPosted: Tue Jan 10, 2012 12:55 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Jan 10, 2012 1:15 pm
Reply with quote

Hi,

and the JCL error is ??????????

Please show output from job.

Gerry
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Tue Jan 10, 2012 1:18 pm
Reply with quote

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
View user's profile Send private message
Vandana S

New User


Joined: 17 Dec 2007
Posts: 20
Location: Mumbai

PostPosted: Tue Jan 10, 2012 1:22 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Jan 10, 2012 1:25 pm
Reply with quote

Hi,

that's not a JCL error but a parameter error

Gerry
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Jan 10, 2012 2:08 pm
Reply with quote

Hi,

I'm fairly sure that SYNCSORT does not support symbolic parameters,
ie the function is not available in SYNCSORT.


Gerry
Back to top
View user's profile Send private message
Vandana S

New User


Joined: 17 Dec 2007
Posts: 20
Location: Mumbai

PostPosted: Tue Jan 10, 2012 2:28 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jan 10, 2012 3:09 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Jan 10, 2012 3:20 pm
Reply with 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 - Gerry, AFAIK.
Back to top
View user's profile Send private message
Vandana S

New User


Joined: 17 Dec 2007
Posts: 20
Location: Mumbai

PostPosted: Tue Jan 10, 2012 3:20 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jan 10, 2012 3:23 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jan 10, 2012 6:07 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 11, 2012 5:51 am
Reply with quote

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 icon_neutral.gif
Back to top
View user's profile Send private message
snammi

New User


Joined: 18 Mar 2009
Posts: 11
Location: Bangalore

PostPosted: Mon Mar 19, 2012 5:21 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Mar 19, 2012 6:34 pm
Reply with quote

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
View user's profile Send private message
snammi

New User


Joined: 18 Mar 2009
Posts: 11
Location: Bangalore

PostPosted: Mon Mar 19, 2012 6:35 pm
Reply with quote

I followed the alternative suggested by Bill Woodger and it fetched me the desired output.

Thank you!
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Mar 19, 2012 6:39 pm
Reply with quote

Thanks for coming back and posting what worked for you.

Have a good one, icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Injecting HTTPHEADER parameters in th... PL/I & Assembler 0
Search our Forums:

Back to Top