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
 

 

COBOL Abend recovery using check-point's

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
yuvrajdutta

New User


Joined: 13 Jul 2009
Posts: 40
Location: India

PostPosted: Fri Apr 15, 2011 6:15 pm    Post subject: COBOL Abend recovery using check-point's
Reply with quote

This is purely for an educational purpose.

I've been trying to figure out how the RERUN clause in COBOL works but have been unsuccessful till now.

As of now I have a COBOL program reading a variable list of 2 digit numbers from a VB file with a sum of all the numbers as the output and want to employ abend recovery using a check-point in particular with a RERUN.

Code:

FILE-CONTROL.                                                 
    SELECT INPUT-FILE ASSIGN TO READER                       
    ORGANIZATION IS SEQUENTIAL                               
    ACCESS MODE IS SEQUENTIAL                                 
    FILE STATUS IS FILE-STATUS.                               
I-O-CONTROL.                                                 
    RERUN ON RESCUE EVERY 2 RECORDS OF INPUT-FILE.           
DATA DIVISION.                                               
FILE SECTION.                                                 
FD INPUT-FILE                                                 
    BLOCK CONTAINS 27703 TO 27998 CHARACTERS                 
    RECORD IS VARYING IN SIZE FROM 2 TO 296 CHARACTERS       
    DEPENDING ON SIZE-VAR                                     
    LABEL RECORDS ARE STANDARD                               
    DATA RECORD IS INPUT-REC                                 
    RECORDING MODE IS V.                                     
01 INPUT-REC.                                                 
   88  END-OF-FILE VALUE HIGH-VALUES.                         
   05  STRING-IN OCCURS 1 TO 148 TIMES DEPENDING ON DSIZE-VAR.
       10 NUM-IN PIC 9(2).                                   


Code:

//RUN##PGM EXEC PGM=ADDFIELD,COND=(4,LE)         
//READER   DD   DSN=R01029.COBOL.INPUT.VB,DISP=SHR
//RESCUE   DD   DSN=R01029.COBOL.CHKPOINT,       
//            VOLUME=(PRIVATE,RETAIN),           
//            DISP=(MOD,PASS)                     
//STEPLIB  DD   DSN=R01029.COBOL.LOADLIB,DISP=SHR
//SYSPRINT DD   SYSOUT=*                         
//SYSOUT   DD   SYSOUT=*                         


I assumed(presumably wrong) that the DCB of a check point dataset would be similar to the DCB of the SYS1.HASPCKPT which is incidentally the JES2 check-point dataset.

At the outset I have been through the Enterprise Cobol manual and have been searching several forums but the DCB of a check point dataset aint mentioned anywhere.

In my JOB Log all I am prompted for is:

Code:

*IEC254D SHOULD COBOLCOM USE (RESCUE,D313,ETRU04) FOR CREATING A NEW CHECKPOINT DATA SET
*59 IEC254D REPLY 'YES' OR 'NO'                                                 


But I am not sure how I am supposed to reply and my program execution step remains active till I forcibly CANCEL my job off.

Now as per http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.idac700/laext.htm I am supposed to

Quote:

Return code 4 and the TEPACHKPT bit set off results in the system assuming the tape is secure. This is like a reply of "YES" to the messages.


But DFSMS is overkill for me..

I did find a good document for CHECKPOINT restart though and am attaching it in this post.
Back to top
View user's profile Send private message

yuvrajdutta

New User


Joined: 13 Jul 2009
Posts: 40
Location: India

PostPosted: Mon Apr 18, 2011 11:07 am    Post subject: Reply to: COBOL Abend recovery using check-point's
Reply with quote

Can anyone please help me out with this.. icon_smile.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1713
Location: UK

PostPosted: Mon Apr 18, 2011 11:26 am    Post subject:
Reply with quote

Well, you posted on Friday afternoon - it is now early Monday morning. What are you expecting - people not to have weekends? And, as has been mentioned several times - do not post attachments. Some people cannot see them and I, for one, do not bother to even try to look at them.
Back to top
View user's profile Send private message
yuvrajdutta

New User


Joined: 13 Jul 2009
Posts: 40
Location: India

PostPosted: Mon Apr 18, 2011 12:05 pm    Post subject: Reply to: COBOL Abend recovery using check-point's
Reply with quote

Ok Nic.. will avoid attachments from now.. icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Apr 18, 2011 4:30 pm    Post subject:
Reply with quote

    1. Check-point restart are specific to your shop, if you want to use it in some Prod-application - you need to use the method which is in use at your shop. You should not invent your own check-point logic.

    2. The document you attach, describes the check-point logic for some shop - it it's not for Your shop -- don't use it!

    3. Checkpoint- restart for a Batch-COBOL program and JES2-checkpoint restart has got nothig to do with each other from an Application Programmer per se. Check-Point/restart for a COBOL program is a user written method. For most of the shop, which use this, it has been devised by someone (may be more than one meembers) and others just follow that.

    4. You said, it's only for learning purpose, so to get you started --tell me, if you know using GSAMs?
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Mon Apr 18, 2011 5:37 pm    Post subject:
Reply with quote

Message IEC254D appears on the console and can only be responded to by an Operator. I strongly suggest that you cease this line of research until you have checked with your local support folks. Most shops do not want application programs to issue messages to the console, particularly those that require operator intervention. It is generally regarded as an archaic technique that is highly disruptive.

BTW, in 30 years of working with Cobol I have never seen a program that used the RERUN clause or native MVS checkpoint facilities.
Back to top
View user's profile Send private message
yuvrajdutta

New User


Joined: 13 Jul 2009
Posts: 40
Location: India

PostPosted: Mon Apr 18, 2011 11:22 pm    Post subject: Reply to: COBOL Abend recovery using check-point's
Reply with quote

Anuj,

Before you mentioned GSAM in the post above.. I had no idea on them to be very frank.. but have some preliminary IDEA about them now.

Seems they are similar to QSAM files but rather than the TOP-DOWN approach mandatory for a QSAM file we can perform DYNAMIC(If i may use it in this context) extraction of data.

And it seems its somewhat related to IMS.. and I have no idea of IMS.

And the said query has nothing related to my professional work.. just plain curiosity and "if its there, there must be some purpose.. so better to write up something using it and exploit it"

Bill,

Seems the situation is more grim than I anticipated.. icon_eek.gif
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Tue Apr 19, 2011 2:46 am    Post subject:
Reply with quote

The main purpose of GSAM is to facilitate IMS checkpoint restart; you have to be running under IMS in order to use GSAM. Physically, a GSAM file is indistinguishable from QSAM, but IMS manages it differently. Most notably, IMS automatically keeps track of where you are in the file so that in the event of an abend and subsequent restart, it repositions the file in the right place. This applies to both input and output files.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Tue Apr 19, 2011 5:13 am    Post subject: Re: Reply to: COBOL Abend recovery using check-point's
Reply with quote

yuvrajdutta wrote:

...

Bill,

Seems the situation is more grim than I anticipated.. icon_eek.gif


Is this for me? I'll answer anyway. I commend your spirit and initiative. Don't hold back on them, even if sometimes they lead you up a blind alley. You'll learn things on the journey, anyway.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Apr 19, 2011 6:48 pm    Post subject:
Reply with quote

yuvrajdutta wrote:

...

Bill,

Seems the situation is more grim than I anticipated..
Or is it for Don?

Only on this very Forum, I've seen people calling others as "Bill" instead of their actual names? I was in U.S. for quite time and never waved a hand to someone with a salaution "Bill" while he had a real name - is it a norm and I don't know!
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Apr 19, 2011 8:00 pm    Post subject: Re: Reply to: COBOL Abend recovery using check-point's
Reply with quote

yuvrajdutta wrote:
Before you mentioned GSAM in the post above.. I had no idea on them to be very frank.. but have some preliminary IDEA about them now.
GSAMs, by it's very definkition are, Generalized Sequential Access Method - As Don has mentioned, in IMS, it is a database access method providing accessing support for simple physical sequential data sets, such as tape files, SYSIN, SYSOUT, and other files that are not hierarchic in nature. You can consider it as one occureacne of IMS Segement and only one!

Look here:

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.ims9.doc.adb/dba497.htm
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.ims9.doc.apdb/xf5082.htm

I strongly recommend to get in touch with someone friendly (most of are not though) at your shop or search through the base-line source libraries and check how they are doing it already -- and try to learn that.
Back to top
View user's profile Send private message
yuvrajdutta

New User


Joined: 13 Jul 2009
Posts: 40
Location: India

PostPosted: Tue Apr 19, 2011 9:56 pm    Post subject:
Reply with quote

Anuj.

Will do as you said..

And I had mistakenly referred to Bill instead of Don in my earlier post(Bill had recently helped me out in another KSDS AIX issue and his name was lingering at the back of my mind)

Thanks everyone icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Apr 20, 2011 1:04 am    Post subject:
Reply with quote

You're welcome and Good Luck!icon_smile.gif
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


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