View previous topic :: View next topic
|
Author |
Message |
yuvrajdutta
New User
Joined: 13 Jul 2009 Posts: 40 Location: India
|
|
|
|
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 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 |
|
|
yuvrajdutta
New User
Joined: 13 Jul 2009 Posts: 40 Location: India
|
|
|
|
Can anyone please help me out with this.. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
|
yuvrajdutta
New User
Joined: 13 Jul 2009 Posts: 40 Location: India
|
|
|
|
Ok Nic.. will avoid attachments from now.. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 767 Location: Whitby, ON, Canada
|
|
|
|
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 |
|
|
yuvrajdutta
New User
Joined: 13 Jul 2009 Posts: 40 Location: India
|
|
|
|
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.. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 767 Location: Whitby, ON, Canada
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
yuvrajdutta wrote: |
...
Bill,
Seems the situation is more grim than I anticipated.. |
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
Back to top |
|
|
yuvrajdutta
New User
Joined: 13 Jul 2009 Posts: 40 Location: India
|
|
|
|
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 |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
You're welcome and Good Luck! |
|
Back to top |
|
|
|