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
 

 

Passing a parm from jcl to a cobol program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
venkateswara rao.muppa

New User


Joined: 21 May 2007
Posts: 5
Location: hyderabad

PostPosted: Fri Jul 27, 2007 12:23 pm    Post subject: how to pass values from jcl to pgm through parm
Reply with quote

hi,
could you please tell me the syntax of jcl to pass the value from jcl to cobol program through parm perameter.
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Jul 27, 2007 12:44 pm    Post subject:
Reply with quote

Venkat,

Why did you chose to continue with the old post (also which was not started by you)?

Quote:
could you please tell me the syntax of jcl to pass the value from jcl to cobol program through parm perameter.


Did you refer manual. What did the manual say?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 27, 2007 6:31 pm    Post subject:
Reply with quote

Hello,

As suggested, please start a new topic when you have a new question.

There is much more in both the COBOL and JCL manuals (linked to via the "Manuals" link at the top of the web page), but basically, you need
Code:
//STEPNAME EXEC PGM=COBOLPGM,PARM='theparmdata"
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Sat Jul 28, 2007 3:20 pm    Post subject:
Reply with quote

Hi,

This may help further,
The parm receiving field and the length needs to be specified in linkage section. Also the procedure division should have the USING in it.

So for example if the JCL had something like this:
Code:
//STEPNAME EXEC PGM=PGM1,PARM='This is a Parmeter'

Corresponding COBOL program should have:
Code:
LINKAGE SECTION.
01 PARM-VAL.
05 PARM-LGTH pic S9(4) comp.
05 PARM-DATA-PASSED pic X(80).
.
.
.
PROCEDURE DIVISION using PARM-VAL.
Back to top
View user's profile Send private message
ug123
Warnings : 1

New User


Joined: 01 Mar 2007
Posts: 39
Location: Chennai

PostPosted: Wed Aug 01, 2007 8:21 am    Post subject: Re: Passing a parm from jcl to a cobol program
Reply with quote

Hi all,

I have one problem in this regard..

I have a program which runs in production so i couldnt touch the code..

I need to send the data which is dynamic..

But through parm i can send only 255 characters..

Can anyone tell how to send the data more than 255 characters..

Thanks,
Ugandar
Back to top
View user's profile Send private message
ug123
Warnings : 1

New User


Joined: 01 Mar 2007
Posts: 39
Location: Chennai

PostPosted: Wed Aug 01, 2007 8:23 am    Post subject: Re: Passing a parm from jcl to a cobol program
Reply with quote

Sorry one small correction through parm we can send only 100 characters..

Thanks,
Ugandar
Back to top
View user's profile Send private message
kgumraj2

New User


Joined: 01 Aug 2007
Posts: 42
Location: Hyderabad

PostPosted: Wed Aug 01, 2007 9:15 am    Post subject:
Reply with quote

Yes, you are correct through Parm we can send only 100 characters,

for more information Please See, Thanks

http://ibmmainframes.com/viewtopic.php?t=22825&sid=ee4a173f1baf886cd661655113f662d0
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm


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