Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 CICS transaction slow response time vasanthz All Other Mainframe Topics 1 Thu Jan 19, 2017 1:31 am
No new posts INDEPENDENT CICS TS 4.1 MRO REGION UP... Kyle Carroll CICS 0 Wed Dec 14, 2016 6:55 pm
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us