Using DB2 in a load module in MVS Batch and CICS 
Author Message
 Using DB2 in a load module in MVS Batch and CICS

Folks, please forgive the cross-post and ignore as needed for
non-MVS or CICS types, thanks.

I have a rather serious problem getting a slightly strange
compile to operate correctly and was hopeing someone out there
has solved this problem already.

I am trying to get a DB2 program (single set of source) to
operate in both CICS and MVS Batch environments.  I have
had success with IMS, regular Cobol, Asm/H & HLASM, but when
I try this with a Cobol & DB2 program it always dies in the
initial call to 'DFHEL1':

   * Inserted by translator *********************************
      MOVE '03' TO DIBVER.                            
      MOVE  '........DLI     INITIAL .....' TO DFHEIV0
      CALL 'DFHEI1'  USING  DFHEIV0 DLZDIB.            
   **********************************************************

Now the program has no IMS or CICS commands in it, so I am really
just using the translator to pick up the runtime init call for CICS.

The processor used to compile this thing is something like:

        DB2 Precompiler
        CICS Translator
        COMPILE
        LINK    (batch loadlibs)
        LINK    (online loadlibs)
        BIND    into "Dual" type db2 package

If anyone out there knows what I am missing, and/or can shoot this
whole thing down for a good technical reason, I will send you much
thanks and my first born child.

        Joe Zitzelberger



Sun, 24 Sep 2000 03:00:00 GMT  
 Using DB2 in a load module in MVS Batch and CICS

Quote:

>Folks, please forgive the cross-post and ignore as needed for
>non-MVS or CICS types, thanks.

>I have a rather serious problem getting a slightly strange
>compile to operate correctly and was hopeing someone out there
>has solved this problem already.

>I am trying to get a DB2 program (single set of source) to
>operate in both CICS and MVS Batch environments.  I have
>had success with IMS, regular Cobol, Asm/H & HLASM, but when
>I try this with a Cobol & DB2 program it always dies in the
>initial call to 'DFHEL1':

>   * Inserted by translator *********************************
>      MOVE '03' TO DIBVER.
>      MOVE  '........DLI     INITIAL .....' TO DFHEIV0
>      CALL 'DFHEI1'  USING  DFHEIV0 DLZDIB.
>   **********************************************************

>Now the program has no IMS or CICS commands in it, so I am really
>just using the translator to pick up the runtime init call for CICS.

>The processor used to compile this thing is something like:

> DB2 Precompiler
> CICS Translator
> COMPILE
> LINK (batch loadlibs)
> LINK (online loadlibs)
> BIND into "Dual" type db2 package

>If anyone out there knows what I am missing, and/or can shoot this
>whole thing down for a good technical reason, I will send you much
>thanks and my first born child.

> Joe Zitzelberger


If you can search the AskQ database, there are several answers for this.
The bottom-line is that you need to link-edit in the CORRECT version of the
DFH-stub (i.e. in your link-edit have the correct version 1st in the DD
concatenation of your SYSLIB). As I recall (but I may be completely wrong on
this), there is no way to link-edit in a single version that will work for
both.

The same is basically true for the COBOL run-time modules.  If you have the
CICS set of IGZ (and CEE) routines first in your link-edit step, then the
program MAY not work in batch.

IBM guarantees that the source code and *object* code is portable - it never
says that the load modules are portable.  (Famous case of "read the fine
print")

--
+ +
+   Bill Klein -
         "C" is a nice letter to START the name of your programming language
with
      but I wouldn't want to end up there.



Sun, 24 Sep 2000 03:00:00 GMT  
 Using DB2 in a load module in MVS Batch and CICS

gjjjf



Mon, 25 Sep 2000 03:00:00 GMT  
 Using DB2 in a load module in MVS Batch and CICS

Batch & CICS are 2 different environments. When you the CICS pre-compiler,
it modifies your cobol source. This modified source is then compiled by the
cobol compiler. The problem you are encountering is that the CICS
pre-compiler inserts at the beginning of your program a call to the CICS
stub program to set up the CICS environment. What this means is that you
cannot run a program through the pre-compiler and expect it to run under
CICS.

You could possibly run a normal DB2 compile and get it to run under CICS but
I don't recommend that this be done either. Chances are that CICS calls to
DB2 are reformatted.

Your best solution is to maintain 2 seperate load modules from the same
source. One using the CICS pre-compiler. Having said that, you need to make
sure that the SQL statements in the program are acceptable to CICS. It's
been some time since I've had much to do with SQL & DB2.

Quote:


>>Folks, please forgive the cross-post and ignore as needed for
>>non-MVS or CICS types, thanks.

>>I have a rather serious problem getting a slightly strange
>>compile to operate correctly and was hopeing someone out there
>>has solved this problem already.

>>I am trying to get a DB2 program (single set of source) to
>>operate in both CICS and MVS Batch environments.  I have
>>had success with IMS, regular Cobol, Asm/H & HLASM, but when
>>I try this with a Cobol & DB2 program it always dies in the
>>initial call to 'DFHEL1':

>>   * Inserted by translator *********************************
>>      MOVE '03' TO DIBVER.
>>      MOVE  '........DLI     INITIAL .....' TO DFHEIV0
>>      CALL 'DFHEI1'  USING  DFHEIV0 DLZDIB.
>>   **********************************************************

>>Now the program has no IMS or CICS commands in it, so I am really
>>just using the translator to pick up the runtime init call for CICS.

>>The processor used to compile this thing is something like:

>> DB2 Precompiler
>> CICS Translator
>> COMPILE
>> LINK (batch loadlibs)
>> LINK (online loadlibs)
>> BIND into "Dual" type db2 package

>>If anyone out there knows what I am missing, and/or can shoot this
>>whole thing down for a good technical reason, I will send you much
>>thanks and my first born child.

>> Joe Zitzelberger

>If you can search the AskQ database, there are several answers for this.
>The bottom-line is that you need to link-edit in the CORRECT version of the
>DFH-stub (i.e. in your link-edit have the correct version 1st in the DD
>concatenation of your SYSLIB). As I recall (but I may be completely wrong
on
>this), there is no way to link-edit in a single version that will work for
>both.

>The same is basically true for the COBOL run-time modules.  If you have the
>CICS set of IGZ (and CEE) routines first in your link-edit step, then the
>program MAY not work in batch.

>IBM guarantees that the source code and *object* code is portable - it
never
>says that the load modules are portable.  (Famous case of "read the fine
>print")

>--
>+ +
>+   Bill Klein -
>         "C" is a nice letter to START the name of your programming
language
>with
>      but I wouldn't want to end up there.



Mon, 25 Sep 2000 03:00:00 GMT  
 Using DB2 in a load module in MVS Batch and CICS

Quote:

> Batch & CICS are 2 different environments. When you the CICS pre-compiler,
> it modifies your cobol source.

Please set followup-to to the relevant news groups; this subthread has
nothing to do with assembler, PL/I or REXX.

--

        Shmuel (Seymour J.) Metz
        Senior Software SE
        EDS

The values in From are for the benefit of spammers:
reply to domain exse01.exch.eds.com, user seymour.metz.



Fri, 29 Sep 2000 03:00:00 GMT  
 Using DB2 in a load module in MVS Batch and CICS

Myshko!

I shcho oto ty mav na uvazi??? Na Florydshchyni takogo nema...

(What did you mean by that??? In Florida, it doesn't exist...)

Pavlo

Quote:

> gjjjf



Mon, 02 Oct 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Using DB2 in a load module in MVS Batch and CICS

2. Using DB2 in a load module in MVS Batch and CICS

3. Using DB2 in a load module in MVS Batch and CICS

4. Using a Module in CICS and Batch with File I/O

5. How do I FTP load modules from MVS-->PC-->MVS

6. Batch on unix / CICS transaction on MVS interface

7. CICS & Batch MVS Subroutines

8. Any Cobol - X-train to MVS CICS DB2 - Edinburgh 23rd September

9. US-FL-Jacksonville: NEEDED-- COBOL II MVS, CICS DB2 DB/2

10. US-FL-Jacksonville: NEEDED-- COBOL II MVS, CICS DB2 DB/2

11. MVS Cobol-85 + C.I.C.S. + DB2

12. Boston, MA - Sr. Programmer/Analyst - Cobol, MVS, VSAM, CICS, DB2 or IDMS

 

 
Powered by phpBB® Forum Software