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
 

 

Using CICS GETMAIN or calling CEEGTST

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Aug 24, 2012 9:57 pm    Post subject:
Reply with quote

I found Language Environment Callable Service CEEGTST also can obtain storage dynamically by COBOL program.

which one is better? Using CICS GETMAIN or calling CEEGTST ?

Would u please advise? and why?

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

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7230

PostPosted: Fri Aug 24, 2012 10:02 pm    Post subject: Reply to: Using CICS GETMAIN or calling CEEGTST
Reply with quote

New question, new topic please. Many will ignore the question assuming the new post is something related to the original. On top of that, it is just plain confusing.
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: Fri Aug 24, 2012 11:59 pm    Post subject: Reply to: Using CICS GETMAIN or calling CEEGTST
Reply with quote

To make a long story short, in CICS, use the GETMAIN API. CEEGTST would be a secondary choice, but you'd have to show justification.

As Bill has said, please don't coattail on a previous post.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Aug 25, 2012 12:18 am    Post subject:
Reply with quote

looking at the manuals will tell you the source and controller of the memory acquired
by the two different dynamic memory allocation routines.

based on
  • from where you want to acquire the storage area
  • what controls the acquired memory
  • the affect on CICS performance
,
you would choose the appropriate mechanism.
Only you know the circumstances of your environment.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Sat Aug 25, 2012 3:55 pm    Post subject:
Reply with quote

as my program is called by both online and batch programs, it cannot contain CICS statements.
so, I have to code compiled CICS statements directly into my program, like below:
Code:
*EXEC CICS                                                       
*    GETMAIN SET (CMLAPCMA-DB-BUFF-PTR (WK-BUF-IDX) )             
*        FLENGTH (CMLSEADR-DB-BUFFER-LEN)                         
*        INITIMG (WK-INITIAL-VALUE)                               
*      NOSUSPEND                                                 
*END-EXEC                                                         
             Call 'DFHEI1' using by content X'0c02b000070000ec00f0
-    'f0f1f5f2404040' by reference CMLAPCMA-DB-BUFF-PTR           
     (WK-BUF-IDX) by content X'0000' by reference WK-INITIAL-VALUE
      by reference CMLSEADR-DB-BUFFER-LEN end-call               
*


have u ever seem this kind of programming?
I mean, is this programming type very bad? it might bring much trouble to maintainers, because it's not readable. furthermore, I'm not sure whether such program is required to be re-compiled with the upgration of hardware/software...

in the light of this, personally, I prefer using CEEGTST.

Please kindly advise. thanks.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Sat Aug 25, 2012 4:25 pm    Post subject:
Reply with quote

All programs are run in CICS region , which is a area managed by CICS, but if I use CEEGTST, storage will be allocated from heap, which might be not within the area of CICS region, right?

If it is so, it might adversely impact on CICS performance.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Sat Aug 25, 2012 5:44 pm    Post subject:
Reply with quote

By reading the manual on CEEGTST, I found that in a CICS region CEEGTST will do a CICS GETMAIN behind the scenes anyway. So by using CEEGTST you're just adding overhead to your GETMAIN.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Sat Aug 25, 2012 7:22 pm    Post subject:
Reply with quote

hi, Robert, which manual were you reading when you get the conclusion?

I read <zOS V1R9.0 Language Environment Programming Reference>, but no such result?
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: Sun Aug 26, 2012 1:09 am    Post subject: Reply to: Using CICS GETMAIN or calling CEEGTST
Reply with quote

You didn't mention you had a multi run-environment. icon_rolleyes.gif

Programmatically determine your run-environment -

http://www.ibmmainframes.com/viewtopic.php?p=247556&highlight=#247556

Once you know the environment, save it in a WS field, CALL "CEEGTST" (Batch) or CALL (not LINK-TO) a CICS Sub-Program, (passing 3 fullword placeholder parms) which will establish addressability to the EIB (using the 1st-placeholder parm in an ADDRESS EIB API)), issue a CICS GETMAIN and return the GETMAIN address to the Caller in the 3rd-parm.

Your program's would be isolated from their underlying environment and will not need to be translated as a CICS program. You would compile the Calling programs as if they were Batch COBOL.

As long as you know the run-environment, Batch and CICS functionality can be performed by the use of in-house Called Sub-Programs or LE Callable Service routines, such as "CEEGTST".
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: Mon Aug 27, 2012 3:31 am    Post subject: Reply to: Using CICS GETMAIN or calling CEEGTST
Reply with quote

There's one lingering question I have using "CEEGTST" in CICS.

The LE manual states that previous heap storage acquired by "CEEGTST" will be freed at either STEP or JOB termination, by the Operating System.

Because CICS "DFHSIP" is considered an executable STEP, it seems that this heap storage could be orphaned, unless of course there are considerations in the internal CICS code, which handles the freeing of this storage at task termination.

However, if an abend occurs, will the storage be freed?

CICS GETMAINed storage (via the API) is automatically free at task termination, except for GETMAINed SHARED, unless previous (explicitly) FREEMAINed before task termination.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm


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