Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
CICS programs - NODYNAM compiler options.

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

New User


Joined: 29 Mar 2006
Posts: 59
Location: Montreal

PostPosted: Mon Jul 19, 2010 7:22 pm    Post subject: CICS programs - NODYNAM compiler options.
Reply with quote

PGM-1 is main CICS programs calling another CICS program PGM-2
PGM-1 compiled with RENT,NODYNAM,LIB

statements in PGM-1
05 Var-1 PIC X(08) VALUE 'PGM-2'

CALL Var-1 USING BY REFERENCE
DFHEIBLK, CA-COMMAREA,
Copybook1,
Copybook2,


PGM-2 again calling another DB2 program PGM-3
PGM-2 compiled with RENT,NODYNAM,LIB

statements in PGM-2
05 Var-2 PIC X(08) VALUE 'PGM-3'

CALL Var-2 USING USING Copybook3
Copybook4
copybook5

Now, we are making changes to PGM-2, i.e. changing a working storage constant.
These programs are compiled with NODYNAM option, however used variables in CALL statements, so do i need to recompile and linkedit PGM-1 and PGM-3 along with PGM-2 to make the changes effective, please advise, thanks in advance.
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


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

PostPosted: Mon Jul 19, 2010 7:48 pm    Post subject: Reply to: CICS programs - NODYNAM compiler options.
Reply with quote

CICS/COBOL programs MUST be compiled with NODYNAM.

When CALLING a CICS program, regardless of the language, the normal parmlist is - DFHEIBLK, DFHCOMMAREA, "WHATEVER".

When a CICS/COBOL program is compiled, USING DFHEIBLK DFHCOMMAREA is automatically suffixed to the PROCEDURE DIVISION statement.

You need to change your CALL statement, to include DFHCOMMAREA as the second parameter.

Bill
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Jul 19, 2010 7:50 pm    Post subject:
Reply with quote

Since PGM-2 and PGM-3 are called 'dynamically' (despite the NODYNAM), no.
You can verify that by looking at the link map for PGM-1 and PGM-2 and find no static binding for PGM-2 and PGM-3 respectively.

Use DYNAM to cause nonnested, separately compiled programs invoked through the CALL literal statement to be loaded for CALL, and deleted for CANCEL, dynamically at run time. (CALL identifier statements always result in a runtime load of the target program and are not affected by this option.)
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Jul 19, 2010 7:51 pm    Post subject: Re: Reply to: CICS programs - NODYNAM compiler options.
Reply with quote

Bill O'Boyle wrote:
CICS/COBOL programs MUST be compiled with NODYNAM.

End of story....

Bill
And how is that an answer to the asked question?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Mon Jul 19, 2010 7:56 pm    Post subject: Reply to: CICS programs - NODYNAM compiler options.
Reply with quote

I was emphasizing this fact because sometimes, people can get bad information from other's (such as management types).

But yes, I didn't delve into his question....

Bill
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Jul 19, 2010 8:10 pm    Post subject:
Reply with quote

Three simple rules:
  1. programs written with CICS API's should always be NODYNAM.
  2. Programs written to be invoked from COBOL CALL's - which don't contain CICS API's - should be DYNAM.
  3. you should not COBOL CALL a module that has CICS API's.
Back to top
View user's profile Send private message
venktv

New User


Joined: 29 Mar 2006
Posts: 59
Location: Montreal

PostPosted: Mon Jul 19, 2010 9:21 pm    Post subject: Reply to: CICS programs - NODYNAM compiler options.
Reply with quote

Hi everybody,

Thanks very much for the valuable suggestions.

Regards
Venkat
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Mon Jul 19, 2010 9:31 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
Three simple rules:
  1. programs written with CICS API's should always be NODYNAM.
  2. Programs written to be invoked from COBOL CALL's - which don't contain CICS API's - should be DYNAM.
  3. you should not COBOL CALL a module that has CICS API's.


Dick,

Bullet point one is correct.

Bullet point two may or may not work. I've never tried calling a DYNAM compiled program from CICS. It will probably work, providing the sub-program does not CALL another sub-program. If there is a subsequent CALL, then those results are unpredictable.

Bullet point three. It's perfectly OK to CALL CICS programs, providing that the first two parameters are DFHEIBLK and DFHCOMMAREA. They are parm-addresses 01 and 02 off the R1 parmlist.

A CICS sub-program can determine how it's been accessed by checking (as the first line of code in the program), the contents of EIBRSRCE. If it's equal to the sub-program name, then it was accessed via a LINK-API. Otherwise, it has been CALLED.

Bill
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Jul 19, 2010 10:37 pm    Post subject:
Reply with quote

point 3, thanks for the update.

point 2, believe me - we have written subsystems, cobol called from a cics module, that dynamically call cobol modules, sometimes upto 18 deep.

only thing about point 2, we have found that linkage structures should not exceed 4k. can have multiples, but we found 4k max per structure was best.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jul 19, 2010 10:44 pm    Post subject:
Reply with quote

Dick, I hear you there! Back when I worked for a software vendor, we had a limit of 1500 bytes being passed to a subroutine. After the design was changed to allow up to 9999 bytes and the system shipped to customers, we found a S0C4 occurred. The customer's program, which called ours, was passing less than 4K and using 1 4-byte address for that data. Our program now expected 9999 bytes and was using 3 4-byte addresses. This messed up the linkage conventions, to say the least, and caused the S0C4.
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 ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts pointers on using USS and C programs. Pedro All Other Mainframe Topics 0 Wed Oct 04, 2017 4:38 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us