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
 

 

Passing PARMS in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Shaldrin M Pereira

New User


Joined: 13 Jul 2012
Posts: 6
Location: INDIA

PostPosted: Mon Jul 16, 2012 12:50 pm    Post subject: Passing PARMS in JCL
Reply with quote

Hi

I am trying to pass parms to my cobol program via jcl

When I pass the parm '6W6ML2552' of length 9 bytes and display this parm in the program which is received via the linkage section, the parms is displayed as '6W6ML2552' itself.

But when I pass the parm '6&&802552' of length 9 bytes, the parm displayed in the program is '6&802552'.

I came to know from testing that the last postion in the 9 bytes is filled by spaces. Any way that I can pass '6&&802552' and get the same value in the program???
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 16, 2012 12:54 pm    Post subject:
Reply with quote

& is a special action character withing the IBM mainframe world.

Looking at that example, I would perhaps try to resolve the issue using a variable number of &'s to see what results I got.
Back to top
View user's profile Send private message
Shaldrin M Pereira

New User


Joined: 13 Jul 2012
Posts: 6
Location: INDIA

PostPosted: Mon Jul 16, 2012 1:15 pm    Post subject: Passing PARMS in JCL
Reply with quote

Hi

Thanx for the reply

Can u give me an example??
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Jul 16, 2012 1:21 pm    Post subject: Reply to: Passing PARMS in JCL
Reply with quote

If it takes two & in the parm-string to display one &, then try three & to display two &.

Or, try using hex-notation X'F65050F8F0F2F5F5F2'.

X'50' is an ampersand.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2435
Location: Netherlands, Amstelveen

PostPosted: Mon Jul 16, 2012 2:28 pm    Post subject:
Reply with quote

From the MVS JCL Reference :


Code each apostrophe and ampersand that is part of the subparameter as two consecutive
apostrophes or ampersands. For example, code 3462&5 as PARM='3462&&5'.
However, if a subparameter contains a symbolic parameter, code a single ampersand. You can
code the symbolic parameter in apostrophes.
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
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts Jcl pram vs proc parms ashek15 JCL & VSAM 3 Thu Mar 30, 2017 6:50 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Passing information through JCL as in... Pia Baruah JCL & VSAM 5 Wed May 25, 2016 2:22 pm
No new posts Confusion while passing data to a cal... amitc23 COBOL Programming 5 Mon Mar 07, 2016 12:36 pm


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