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

Passing a parm from jcl to a cobol program


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1436
Location: Bangalore,India

PostPosted: Fri Jul 27, 2007 12:44 pm
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

Moderator Emeritus


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

PostPosted: Fri Jul 27, 2007 6:31 pm
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

Superior Member


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

PostPosted: Sat Jul 28, 2007 3:20 pm
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top