View previous topic :: View next topic
|
Author |
Message |
venktv
New User
Joined: 29 Mar 2006 Posts: 59 Location: Montreal
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Three simple rules:- programs written with CICS API's should always be NODYNAM.
- Programs written to be invoked from COBOL CALL's - which don't contain CICS API's - should be DYNAM.
- you should not COBOL CALL a module that has CICS API's.
|
|
Back to top |
|
|
venktv
New User
Joined: 29 Mar 2006 Posts: 59 Location: Montreal
|
|
|
|
Hi everybody,
Thanks very much for the valuable suggestions.
Regards
Venkat |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
dbzTHEdinosauer wrote: |
Three simple rules:- programs written with CICS API's should always be NODYNAM.
- Programs written to be invoked from COBOL CALL's - which don't contain CICS API's - should be DYNAM.
- 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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|