× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Siva,
COMMIT & ROLLBACK statements works only if your pgm has a COMMITMENT
CONTROL FOR .. specifying the list of files under commitment control.
One solution that works fine in my shop is the follow:

1) In your cl pgm, before calling your cobol programs send a journal
entry to the journal receiver specifying in the ENTDTA keyword a unique
string that we will use later in case off "rollback": 

        SNDJRNE    JRN(MYLIB/MYJRN) TYPE('BE') +                   
             ENTDTA('mystring') FORCE(*YES) 

2) Call your program 
        CALL       PGM(MYPGM) PARM(....)

3) In case of errors do the following steps
        a) retrieve the entry previously sent
        b) issue RMVJRNCHG command
        RTVJRNE    JRN(MYLIB/MYJRN) FILE(*ALLFILE) +               
               RCVRNG(*CURRENT) FROMENT(*LAST) +             
                 TOENT(*FIRST) SEARCH(*DESCEND) JRNCDE(U) +    
                     ENTTYP(BE) JOB(&NBR/&USER/&JOB) +             
                     RTNSEQNBR(&SEQNBR) RTNJRNE(&JRNE)             
        RMVJRNCHG  JRN(MYLIB/MYJRN) FILE((MYLIB/*ALL)) +         
                     TOENT(&SEQNBR) CMTBDY(*YES)                   

Note: 1) ***ATTENTION*** this solution works ONLY if your job is the
ONLY job that updates the database in the time between the sndjrne and
the rmvjrnchg commands (e.g. running in a single execution jobq).
        2) Be sure to match the keywords TYPE('BE') in the SNDJRNE with
ENTTYP keyword in RTVJRNE. 
Regards.

Roy Restuccia

Sifa Srl
57, Corso Inghilterra
10138 Torino
tel +39 011 4476335
fax +39 011 4476337
cell +39 333 6205333
e-mail roy.restuccia@xxxxxxxxx



-----Messaggio originale-----
Da: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] Per conto di A.
Sivasubrahmanian
Inviato: martedì 1 luglio 2003 13.40
A: cobol400-l@xxxxxxxxxxxx
Oggetto: Commitment control - Batch job


Hi 

I have a batch job in which commitment control is not working. Scenario
is mentioned below:- 

A CL program is submitted that calls a number of OPM COBOL and ILE COBOL
programs. If any error is found in the data being processed, error
report are generated. When error report is generated, a flag in LDA is
set to "Y". This flag is checked in the submitted CL program for a value
of "Y" and ROLLBACK is issued if true. Otherwise, COMMIT is issued. 

A STRCMTCTL is issued at the start of the CL that is submitted. NO files
are declared under commitment control in OPM COBOL or ILE COBOL
programs. 

Even after the issue of ROLLBACK, changes made to database files are not
rolled back. 

Is there a way to rollback with out including Commitment control for the
files in OPM or ILE COBOL programs? I don't have the luxury to change
the COBOL programs. Is it possible to ROLLBACK or COMMIT the changes at
the end of the job? 

Thanks & Regards
Siva


**************************Disclaimer************************************

Information contained in this E-MAIL being proprietary to Wipro Limited
is 
'privileged' and 'confidential' and intended for use only by the
individual
 or entity to which it is addressed. You are notified that any use,
copying 
or dissemination of the information contained in the E-MAIL in any
manner 
whatsoever is strictly prohibited.

************************************************************************
***
_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.