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

JCL PARM parameter


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 218
Location: India

PostPosted: Thu Sep 11, 2008 3:29 pm
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
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: 218
Location: India

PostPosted: Thu Sep 11, 2008 3:56 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
Search our Forums:

Back to Top