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 Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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