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

Cobol environment variable and XCTL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Jan 21, 2016 9:22 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
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