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

Passing PARMS in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Jul 16, 2012 12:54 pm
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Mon Jul 16, 2012 1:21 pm
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon Jul 16, 2012 2:28 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Passing SYSPRINT to Invoked Program PL/I & Assembler 9
No new posts Passing parm from JCL to Assembler, b... PL/I & Assembler 2
No new posts passing symbolic parameters through d... JCL & VSAM 3
No new posts define 1 DCB parms for multiple outpu... JCL & VSAM 9
Search our Forums:

Back to Top