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
 
DB2 with CICS transactions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Ganesh Kumar.J

New User


Joined: 06 Feb 2006
Posts: 4

PostPosted: Wed Mar 29, 2006 10:34 am    Post subject: DB2 with CICS transactions
Reply with quote

Hi,
Anyone can help me how to insert records in the DB2 table using CICS transactions. I have tried the following code. The cntrl is not going into the insert statement it is directly go to the refresh para. Please give me your valuable suggestions.

2300-ADDUSER-PARA.
MOVE LOW-VALUES TO AMAPI.
EXEC CICS SEND
MAP('AMAP')
MAPSET('KGCM021')
ERASE
ALARM
END-EXEC.
MOVE 'SUCCESSFULLY ADDED ' TO MGS1O.
EXEC CICS RECEIVE
MAP('AMAP')
MAPSET('KGCM021')
INTO(AMAPI)
END-EXEC.
MOVE AOPTI TO WS-AOPT.
IF WS-AOPT = 'Y' AND EIBAID = DFHPF5
MOVE AUNAMEI TO WS-AUSERNAME
MOVE AUIDI TO WS-AUSERID
MOVE ADOBI TO WS-ADOB
MOVE AADDRI TO WS-AADDR
MOVE ACNTI TO WS-ACONTACT
PERFORM 2310-AMOVE-PARA

EXEC SQL INSERT INTO URTAB VALUES(:URNAME,
:URID,
:URDOB,
:URADDR,
:URCONT)
END-EXEC
MOVE 'SUCCESSFULLY INSERTED' TO MGS1O
EXEC CICS SEND
MAP('AMAP')
MAPSET('KGCM021')
ERASEAUP
END-EXEC
EXEC CICS RETURN
END-EXEC
PERFORM 2320-REFRESH-PARA
MOVE 'SUCCESSFULLY ADDED ' TO MGS1O
ELSE
IF WS-AOPT = 'N' AND EIBAID = DFHPF5
PERFORM 2320-REFRESH-PARA
ELSE
IF EIBAID = DFHPF3
PERFORM 2100-MAIN-PARA
END-IF
END-IF
END-IF.
2310-AMOVE-PARA.
MOVE WS-AUSERNAME TO AUNAMEO.
MOVE WS-AUSERID TO AUIDO.
MOVE WS-ADOB TO ADOBO.
MOVE WS-AADDR TO AADDRO.
MOVE WS-ACONTACT TO ACNTO.

2320-REFRESH-PARA.
MOVE LOW-VALUES TO AMAPI.
EXEC CICS
SEND MAP('AMAP')
MAPSET('KGCM021')
ERASE
ALARM
END-EXEC.
EXEC CICS RECEIVE
MAP('AMAP')
MAPSET('KGCM021')
END-EXEC.


Thanks,
Ganesh Kumar.J
Back to top
View user's profile Send private message

Manojudha

New User


Joined: 13 Jul 2005
Posts: 13

PostPosted: Wed Mar 29, 2006 11:29 am    Post subject: Re: DB2 with CICS transactions
Reply with quote

Hi

Try giving an exit para after the refresh para

Change your perform statement to

Perform ....refreshpara thru exit-para.

It should work

Thanks
Mano
Back to top
View user's profile Send private message
Manojudha

New User


Joined: 13 Jul 2005
Posts: 13

PostPosted: Wed Mar 29, 2006 11:32 am    Post subject: Re: DB2 with CICS transactions
Reply with quote

I doubt with your program..

You insert values with variables urname, urid.,,etc.. But you have not moved the values to these variables. Please check or send me your full code.
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm
No new posts Need to track the CICS transaction fr... sam8051 CICS 3 Mon Aug 07, 2017 3:11 pm
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

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