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
 

 

Cobol environment variable and XCTL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Mainak_Dalal

New User


Joined: 05 May 2010
Posts: 19
Location: USA

PostPosted: Thu Jan 21, 2016 1:28 am    Post subject: Cobol environment variable and XCTL
Reply with quote

Doesn't cobol environment variables set by CEEENV in a calling CICA program flow to another CICS module transfered through XCTL?
Back to top
View user's profile Send private message

Mainak_Dalal

New User


Joined: 05 May 2010
Posts: 19
Location: USA

PostPosted: Thu Jan 21, 2016 10:17 am    Post subject:
Reply with quote

I checked IBM knowledge center but could not find any details on scope of a environment variable, that we can set using CEEENV. In one of our CICS module I was trying to pass a value to another module (Control passed through XCTL) through Environment variable. However I found that the variable and its value lost in the 2nd program. I was trying to experiment passing value without a Commarea / Linkage or TSQ method. But it did not work ��
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jan 21, 2016 9:22 pm    Post subject: Reply to: cobol environment variable and xctl
Reply with quote

What if you GETMAINed 31-Bit storage, large enough to house all the CEEENV parameters, move these parameters to the GETMAINed area, then pass the ADDRESS OF the GETMAINed area in the XCTL "INPUTMSG" parm or if you have 4-Bytes to spare, store the ADDRESS in the existing commmarea? In either case, define a POINTER to WS and set it to the GETMAINed address.

Then, when the XCTL completes, obtain this ADDRESS from the "INPUTMSG" (or commarea), establish addressability to this ADDRESS (POINTER) in a LINKAGE structure that formats the CEEENV parmdata and you're done.

GETMAINed Storage automatically FREEs at Task Termination, but you can FREE it yourself, after you save the data somewhere (like WS).

Note: The program with which you're XCTLing to must be AMODE 31, RMODE ANY and is most likely in this day and age. icon_wink.gif

HTH....
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Jan 22, 2016 12:43 am    Post subject:
Reply with quote

Bill, if he is going to go through all of that he might as well just pass the data from the first program to the second program in the commarea on the XCTL command
Back to top
View user's profile Send private message
Mainak_Dalal

New User


Joined: 05 May 2010
Posts: 19
Location: USA

PostPosted: Fri Jan 22, 2016 10:02 am    Post subject:
Reply with quote

Yes, I can just pass it using Commarea or go through Temp storage in CICS. I was just experimenting a newer way of intercommunicating between 2 cobol CICS progs through environment vars
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


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