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
 

 

Can not insert new record into VSAM file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
iamyinhe

New User


Joined: 27 Apr 2006
Posts: 7

PostPosted: Wed Feb 27, 2008 11:11 am    Post subject: Can not insert new record into VSAM file
Reply with quote

I have a program to insert new record into VSAM file. After program completed without any Natural error message, i can not find the new record in that file.

I call "WMLOG" to write the maintenance log and I confirm program WMLOG completed successfully, does it mean the STORE statement completed successfully?

FOR #INDEX 1 TO 12
IF #SCR-AAAA(#INDEX) NE ' '
FIND TABLE1-V WITH AAAA EQ #SCR-AAAA(#INDEX)
IF NO RECORD FOUND
AAAA := #SCR-AAAA(#INDEX)
STORE TABLE1-V
ESCAPE BOTTOM
END-NOREC
END-FIND
#PARA-REC-TYPE := 'AD-AAAA'
#PARA-PGM-ID := *PROGRAM
#PARA-USER-ID := *USER
CALLNAT 'WMLOG' #PARA-M-LOG /*write maintenance log
END-IF
END-FOR
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 27, 2008 11:41 am    Post subject:
Reply with quote

1. I don't see END TRANSACTION anywhere.
2. Have you tried to run it with debugger (TEST ON)?
3. Have you tried to run it with database log (DBLOG ON)?

O.
Back to top
View user's profile Send private message
iamyinhe

New User


Joined: 27 Apr 2006
Posts: 7

PostPosted: Wed Feb 27, 2008 4:26 pm    Post subject:
Reply with quote

ofer71 wrote:
1. I don't see END TRANSACTION anywhere.
2. Have you tried to run it with debugger (TEST ON)?
3. Have you tried to run it with database log (DBLOG ON)?

O.


If no END TRANSACTION, what will happen? I test the same code in my testing env, it does work, but in another env, no new record was added into file. And no error message...
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 27, 2008 5:43 pm    Post subject:
Reply with quote

There could be a lot of reasons for the record not to be stored, therefor debug tools are a great solutions in those cases. As I already noted, the DBLOG tool should be your first shot, as it logs database activities.

END TRANSACTION is Software AG's equivalent to COOMIT. Usually, without END TRANSACTION, any changes to the database are not written. Exceptions might be under CICS, where implicit SYNCPOINT is issued after input or with some installations that define an automatic ET (END TRANSACTION) at the end of each session.

O.
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 -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm


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