Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us