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 CICS startup problem John Poulakos CICS 3 Tue Jun 12, 2018 9:08 pm
No new posts How do you attach a DB2 plan to a CIC... John Poulakos DB2 0 Wed Apr 18, 2018 1:49 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts How do I define a DB2 plan for a web ... John Poulakos CICS 5 Sat Apr 14, 2018 1:58 am
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm

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