Page 1 of 1

CICS Program Accessing tables

PostPosted: Sun Mar 24, 2013 3:30 am
by Nara_513
Hi All,

I am editting a CICS program which is using a table 'AAA' . The program when run in production CICS uses the production table and when run in Test uses corresponding test 'AAA' table.

I have created table 'AAA' in test region , with creator as my "User id " .
Now my requirement is : I have to test the CICS program in test regions and the program has to use the test table created by me instead of the original test table .

Original Cursor statament :

FROM   AAA
WHERE  STR_I = :WS-TEMP
 AND  ACTL_APPL_AMOUNT  = :WS-TEMP-FETCH-AMT
ORDER BY TRAN_DATE DESC,



I have edited it to

FROM   USER_ID.AAA
WHERE  STR_I = :WS-TEMP
 AND  ACTL_APPL_AMOUNT  = :WS-TEMP-FETCH-AMT
ORDER BY TRAN_DATE DESC,



When i tried to compile , it got compiled, but it got failed while binding . I guess am not supposed to mention the qualifier of teh table explicitly in the CICS program .

Can you please suggest me how i can resolve this , is their any setting in CICS where i can edit my tran settings to use the table i wish ?

Thanks Nara

Re: CICS Program Accessing tables

PostPosted: Sun Mar 24, 2013 5:52 pm
by NicC
Do not change the program. With DB2 one of the 'selling points' is minimal coding changes when something changes. You bind it to your table's ID.

BTW it would have been a good idea in your heading to say DB2 table to avoid people thinking it was a COBOL internal table which was not obvious until seeing your code.

Re: CICS Program Accessing tables

PostPosted: Wed Mar 27, 2013 12:00 am
by Nara_513
Hi NicC,

I have binded my program using the below code :

DSN S(DB2T)
   BIND PACKAGE(*****) MEMBER(********) -
       LIBRARY('DBRM LIBRARY') -
       OWNER(USER ID )     QUALIFIER(USER ID ) CURRENTDATA(NO )       -
       VALIDATE(BIND)      EXPLAIN(NO )        ACTION(REPLACE)        -
       SQLERROR(NOPACKAGE) ISOLATION(CS)       RELEASE(COMMIT    )    -
       DEGREE(ANY)                                                    -
       DYNAMICRULES(RUN       )                                       -
       NOREOPT(VARS)                                                  -
       KEEPDYNAMIC(NO )                                               -
       DBPROTOCOL(DRDA   )                                            -
       FLAG(I);
END



The bind was successfull , checked whether the tran is using my table, but it is using the same old test table.
Did a new copy of the tran, still i got the same result.

Checked with my CICS site admin, could see that the DB2 entry for the CICS transaction is pointing to a different plan , so do i need to use the esisting plan defined for the tran and rebind the program ?

Thanks