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
 

 

JCL PARM parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sandippawar21
Currently Banned

New User


Joined: 09 Sep 2008
Posts: 9
Location: Pune

PostPosted: Thu Sep 11, 2008 3:26 pm    Post subject: JCL PARM parameter
Reply with quote

I have a JCL which executes a program and passes a 4 byte data as a PARM as coded below

//STEP01 EXEC PGM=PROGRAM,PARM='HELL'

And in linkage section of the COBOL program the receiving field is of
size X(02).What will be the results during the runtime?

And if receiving field is of size 9(02)..what will happen?
Back to top
View user's profile Send private message

sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Thu Sep 11, 2008 3:29 pm    Post subject: Re: JCL PARM parameter
Reply with quote

sandippawar21 wrote:
I have a JCL which executes a program and passes a 4 byte data as a PARM as coded below

//STEP01 EXEC PGM=PROGRAM,PARM='HELL'

And in linkage section of the COBOL program the receiving field is of
size X(02).What will be the results during the runtime?

And if receiving field is of size 9(02)..what will happen?


Why can not you code a simple program to Test ur questions and also let us know the results.
Back to top
View user's profile Send private message
sandippawar21
Currently Banned

New User


Joined: 09 Sep 2008
Posts: 9
Location: Pune

PostPosted: Thu Sep 11, 2008 3:35 pm    Post subject: JCL PARM parameter
Reply with quote

Hi,

I don't have access to aminframe....thats y I shared this topic here.

Please anybody tell me the solution.
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Thu Sep 11, 2008 3:56 pm    Post subject: Re: JCL PARM parameter
Reply with quote

sandippawar21 wrote:
I have a JCL which executes a program and passes a 4 byte data as a PARM as coded below

//STEP01 EXEC PGM=PROGRAM,PARM='HELL'

And in linkage section of the COBOL program the receiving field is of
size X(02).What will be the results during the runtime?

And if receiving field is of size 9(02)..what will happen?


01 WS-LINKAGE.
05 WS-LENGTH PIC S9(04) COMP.
05 WS-ABCD PIC X(02).

If you declare like this then WS-ABCD will hold two characters and you are loosing the other two characters.

Program will run fine but you will not get correct results.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Sep 11, 2008 5:06 pm    Post subject:
Reply with quote

If no of characters passed in PARM is more than
linkage section alpha numeric field declaration
In below example
Code:

01 WS-LINKAGE.
05 WS-LENGTH PIC S9(04) COMP.
05 WS-ABCD PIC X(02).


if you pass 'ABCDE' from PARM
WS-LENGTH will be correct i.e. 5
but WS-ABCD will have value 'AB' only
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Sep 11, 2008 5:14 pm    Post subject:
Reply with quote

Quote:

And if receiving field is of size 9(02)..what will happen?

and about above question Sandip ressult will be same as with alphanumeric.
So it will work fine as long as you are not using it for any calculations 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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm


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