Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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 -> Mainframe COBOL
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
References
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 197
Location: At my Desk

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: 197
Location: At my Desk

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
Sambhaji
Warnings : 1

Active User


Joined: 16 Feb 2007
Posts: 268
Location: Pune, India

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
Sambhaji
Warnings : 1

Active User


Joined: 16 Feb 2007
Posts: 268
Location: Pune, India

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1