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
 

 

How to pass parm parameter to COBOL program

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

New User


Joined: 18 Jul 2006
Posts: 1

PostPosted: Tue Jul 18, 2006 3:32 pm    Post subject: How to pass parm parameter to COBOL program
Reply with quote

Hi,

can you any one help me , i want to pass data like (A or B or C or D... like this) thru parm and in cobol i want to check in procedure division if A goto para-100 else B goto para-200 like , insted of this how can i code evaluate ...

Raj
Back to top
View user's profile Send private message

parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Tue Jul 18, 2006 3:59 pm    Post subject:
Reply with quote

Hi,

Code:

EVALUATE PARAM-VALUE

WHEN 'A'
  goto para-100
WHEN 'B'
 goto para-200
...
...

END-EVALUATE
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Tue Jul 18, 2006 4:23 pm    Post subject: Re: Related parm parameter
Reply with quote

hI,

If i understood your requirement, You need to Pass the Parm to cobol program eitehr A or B or C.

There are 2 ways to pass the Para to the Program.

The First is use PARM='A' in the JCL
//COBOLPGM EXEC PGM=PGM
// PARM=('A')

or

pass the Param value thru SYSIN as

//SYSIN DD *
A
/*
//Input ...........


You just choose either of the methods.
Please be free if still not clear with this..

~Vamsi
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Tue Jul 18, 2006 4:28 pm    Post subject: Re: Related parm parameter
Reply with quote

hello,

u can pass the value into cobol pragram by giving parm parameter like
//step1 exec pgm=pgm1,parm='xyz'
//...........

that xyz value would be recieve in linkage section of cobol program..
Back to top
View user's profile Send private message
Muthukumar.PLindia

New User


Joined: 03 Jul 2006
Posts: 51
Location: Chennai

PostPosted: Tue Jul 18, 2006 8:40 pm    Post subject: A small doubt in this
Reply with quote

IF we are passing parm from JCL to cobol the linkage section should be coded like this


linkage section
01 ls-var
03 filler pic x(02)
03 ls-parm pic clause

Is it like first 2 bytes will store the length of the parm variable?
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 RULES(NOEVENPACK) in cobol jackzhang75 COBOL Programming 5 Wed Mar 29, 2017 12:47 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


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