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
 

 

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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm


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