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
 
transfer a variable value to cobol program

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

New User


Joined: 05 Sep 2005
Posts: 12
Location: P.R.C

PostPosted: Fri Jan 06, 2006 3:17 pm    Post subject: transfer a variable value to cobol program
Reply with quote

Hi,

I want to exec one cobol program for many times in a JOB. Everytime, the program will receive a changing value from JOB. How to do ?

thanks®ards

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

rajesh_1183

Active User


Joined: 24 Nov 2005
Posts: 121
Location: Tadepalligudem

PostPosted: Fri Jan 06, 2006 5:06 pm    Post subject:
Reply with quote

Hi jerry,

Try using parm parameter in the jcl...

//step1 exec=pgmname,parm=value-for-the-variable1

next declare this variable in the linkage section of the program..

linkage section

01 abcd.
02 variable-len pic s9(4) comp.
02 variable1 pic x(10).

try this....
correct me if i am wrong.....

Thanks,
Rajesh
Back to top
View user's profile Send private message
nrsmca

New User


Joined: 25 May 2005
Posts: 14

PostPosted: Tue Jan 10, 2006 3:50 pm    Post subject:
Reply with quote

1. U should pass value using file from JCL.
2. U open file in I-O mode in prgm.
3. Read ur input record from that file process it and Rewrite the record of it for using next time running same ur prgm.

Ex:-
First time U wants to run ur prgm. With today date, second time tomorrow date,...ect.
In this case read today date from file and using for all process and finally increased by 1 day and rewrite it...!

Thanks,
nrsmca
Back to top
View user's profile Send private message
puneet_ashok

New User


Joined: 11 Jan 2006
Posts: 1

PostPosted: Wed Jan 11, 2006 4:47 pm    Post subject: Re: transfer a variable value to cobol program
Reply with quote

hi

u can pass any parameter through jcl to a cobol program using parm parameter...


in ur linkage section

01 parm

05 parm-length pic s9(4) comp.
05 parm-value pic 9(4).


now u can pass a variable of size 4

jcl:

//parm exec pgm=urpgmname,
// parm='0001'

if u want to add any parameter then u can add and pass the parameter as a concatenated value....

-------------------
Puneet
------------------
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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am

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