Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we pass parameters to SYNCSORT ??
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Can we pass parameters to SYNCSORT ??
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 Moderator


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

PostPosted: Tue Jan 03, 2012 5:39 am    Post subject:
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:

http://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    Post subject: Reply to: Can we pass parameters to DFSORT ??
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Jan 06, 2012 6:37 pm    Post subject: Reply to: Can we pass parameters to DFSORT ??
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

Site Director


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

PostPosted: Fri Jan 06, 2012 8:58 pm    Post subject:
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

Site Director


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

PostPosted: Fri Jan 06, 2012 9:23 pm    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Tue Jan 10, 2012 1:15 pm    Post subject:
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    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Tue Jan 10, 2012 1:25 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Tue Jan 10, 2012 2:08 pm    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Jan 10, 2012 3:09 pm    Post subject: Reply to: Can we pass parameters to SYNCSORT ??
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

Senior Member


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

PostPosted: Tue Jan 10, 2012 3:20 pm    Post subject:
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    Post subject: Re: Reply to: Can we pass parameters to SYNCSORT ??
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Jan 10, 2012 3:23 pm    Post subject: Reply to: Can we pass parameters to SYNCSORT ??
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Jan 10, 2012 6:07 pm    Post subject: Reply to: Can we pass parameters to SYNCSORT ??
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

Site Director


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

PostPosted: Wed Jan 11, 2012 5:51 am    Post subject:
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    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us