MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to pass parmeters from jcl to COBOL program

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
mandar_57
Beginner


Joined: 13 Apr 2008
Posts: 5
Topics: 5
Location: Pune

PostPosted: Sat May 24, 2008 12:18 pm    Post subject: How to pass parmeters from jcl to COBOL program Reply with quote

Hi All,


I am a fresher having 3 mnths exp.
I have a query.

Can we pass parameters thru JCL to cobol program?
If yes, How?


Thanks,
Mandar
_________________
M. Panse
Back to top
View user's profile Send private message Send e-mail
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Sat May 24, 2008 2:55 pm    Post subject: Reply with quote

Have you looked in the COBOL manual?
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Sun May 25, 2008 5:35 am    Post subject: Reply with quote

Or searching this forum? Search on JCL AND parameter
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
nbdtrjk1
Beginner


Joined: 12 Apr 2007
Posts: 76
Topics: 41

PostPosted: Thu May 29, 2008 6:37 am    Post subject: Reply with quote

Below steps we can pass the values from JCL to COBOL pgm.

1. Through Sysin DD card
2. Through Pass Parameter
3. Using file read
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu May 29, 2008 7:08 am    Post subject: Reply with quote

nbdtrjk1 wrote:
Below steps we can pass the values from JCL to COBOL pgm.

1. Through Sysin DD card
2. Through Pass Parameter
3. Using file read


Only number 2 can be done by JCL (Job Control Language) The other 2 are ordinary file reads. And OP stated PARAMETER.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
jctgf
Beginner


Joined: 05 Nov 2006
Posts: 89
Topics: 36

PostPosted: Sat May 31, 2008 4:40 pm    Post subject: Reply with quote

u can do that by using the 'parm=' parameter in your jcl and the linkage section in your cobol program.

jcl:

Code:
//step1 exec pgm=pgm1,parm='hello'


cobol program:
Code:

linkage section.
01 parm.
     03 parm-size   pic s9(04) comp.
     03 parm-value pic x(05).

procedure division using parm.
display 'my parm is=' parm-value.
stop run.


regards
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group