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)
#PARA-REC-TYPE := 'AD-AAAA'
#PARA-PGM-ID := *PROGRAM
#PARA-USER-ID := *USER
CALLNAT 'WMLOG' #PARA-M-LOG /*write maintenance log
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.