0 Replies Latest reply on May 19, 2016 2:06 PM by Richard Smith

    Using Quickstart in second half of a program


      I'm working on a program that compares two lists (say, "current" and "update"), and any item that is on "update" but not on "current" will be added to a database table as well as what will become the next "current" list. This is a COBOL program on a mainframe using MVS, and the database system is DB2. Due to the combination of sequential lists and DB2, it was recommended that I include Quickstart functionality in case of abends to reduce the need for manual intervention, particularly once it enters production.


      One possible cause of abends is if either of the input lists is not completely sorted. I realized that any fix of this issue would mess up the Quickstart file cursor for whichever file had to be re-sorted, requiring all the Quickstart data for the job to be cleared before restarting it.  With that in mind, I reorganized the program to first compare the two lists and write the new "update" records to another file (say, "added"), then closes all files. Stage two re-opens the "added" file for input, and proceeds to do a simple line-by-line copy of the records to DB2.


      The program will be using Quickstart in API mode.  I know Quickstart has to be initialized at the start of the program in order for the program to even determine if it is a checkpoint resubmit, but I don't want it to start keeping checkpoints until the start of stage two.  I know that a checkpoint can be forced, but is there a way to suspend checkpoints for part of a program?  Alternately, is there a way for the program to abend that causes Quickstart to clear its data automatically?


      This is my first time working with Quickstart, so I'm still trying to get acquainted with the basics, which makes it that much more difficult trying to find a detail like this just by searching through the PDFs.  Any assistance would be greatly appreciated!


      Just editing to add: Would calling CKPT-RTN with a CKPT-REQUEST-TYPE = 'E', followed by displaying error details ("Abend U100: Unsorted input file!") and abending by, say, CEE3ABD, create the effect I'm looking for?