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: 7315

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: 6968
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: 8132
Location: East Dubuque, Illinois, USA

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 Need to track the CICS transaction fr... sam8051 CICS 3 Mon Aug 07, 2017 3:11 pm
No new posts Calling CLIST through job and REXX Sahasra K CLIST & REXX 19 Tue Aug 01, 2017 10:25 am
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 pm
No new posts CICS Transaction Timeout Hooman24 CICS 2 Sun Apr 16, 2017 2:16 pm


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