View previous topic :: View next topic
|
Author |
Message |
nileshyp
New User
Joined: 22 Jun 2005 Posts: 65 Location: Mumbai
|
|
|
|
Hi,
I am facing an unusual problem. The sceanario is as follows:-
I have a input file with around 150 recs.
The output file is defined as OPEN EXTEND FILE-OUT
The program wrties the records to O/P after every 100 records commit point Or at the EOF condition.
The jcl declaration for the o/p file is as follows:-
Code: |
//PCSFEEOP DD DSN=TEST.TST.FEEOP,
// UNIT=SYSDA,VOL=SER=TST001,
// DISP=(MOD),
// SPACE=(CYL,(999,999),RLSE),
// DCB=(LRECL=500,RECFM=FB) |
After ist run program got abended at 120th record and O/P file was written 100 recs onto it. When I resubmitted the job from the failed step it again failed at same (i.e. 120th) record and it still have 100 records.
I am not able to understand how o/p file has 100 recs only and why not 200 records when the dispostion is MOD and I am opening it in Extend mode in program. AS per my observation the dataset should be appended each time after running the same step. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
When you post the JCL (or pretty much anything) please use the CODE button, to put the code tags around your data. You have lost all your spacing. You have no comma after the DISP, so you have invalid JCL, which you have presumably typed, so you are not showing the actual JCL. Why not try to copy/paste it, then it saves you work and gets the information you are seeing into the forum as well.
Why would you want duplicate records? If you back-out everything, that should include your PCSFEEOP, if you don't back-out everything you shouldn't be doing the first 100 records again. I don't know about having EXTEND and MOD, I don't think you need both. Personally, I'd go with MOD. The JCL default for only specifying MOD would not delete your file in the case of an abend.
Where are you specifying your blocksize? If you have 100 records from your first run, yet your program abended without correctly closing the file, I'd not expect you to have 100 records, but for the last block (most of your file) to be missing. Is your blocksize 500? I think then you'd get 100 records, but you are doing a lot more actual IO than would be necessary if blocked reasonably.
We'd need more information for the particular problem. Did you look at the messages part of your output and see if there is anything there relating to the file? |
|
Back to top |
|
|
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
Good day,
The reason that you are not appending the next 100 records is because you are missing the KEEP on the Disposition it should be DISP=(MOD,KEEP). IF you don't put the KEEP it will default to delete. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Jose Mateo wrote: |
Good day,
The reason that you are not appending the next 100 records is because you are missing the KEEP on the Disposition it should be DISP=(MOD,KEEP). IF you don't put the KEEP it will default to delete. |
Wrong. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
Jose Mateo wrote: |
Good day,
The reason that you are not appending the next 100 records is because you are missing the KEEP on the Disposition it should be DISP=(MOD,KEEP). IF you don't put the KEEP it will default to delete. |
How would the TS know there are only 100 records if the dataset would have been deleted? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I'm having a long morning. . .
Quote: |
If you omit the status subparameter, the default is NEW.
If you omit the normal termination disposition subparameter, the default is DELETE for a NEW data set or KEEP for an existing data set.
If you omit the abnormal termination disposition subparameter, the default is the disposition specified or implied by the second subparameter. However, if the second subparameter specified PASS, the default abnormal termination disposition is DELETE for a NEW data set or KEEP for an existing data set.
If you omit the DISP parameter, the default is a NEW data set with a disposition of DELETE for both normal and abnormal termination disposition. Thus, you can omit the DISP parameter for a data set that is created and deleted during a step. |
Has it been confirmed whether the dataset exists or is being newly created? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
DISP=MOD, so exists. TS writing to it 100 records at a time. Job fails at 120 input record, TS finds 100 output records on dataset. TS runs job again, fails again, again finds 100 records on dataset. TS wonders why 100, not 200.
Curiously, despite the TS knowing the number of records on the file, Jose thought it might have been deleted. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
DISP=MOD, so exists. TS writing to it 100 records at a time. |
As far as i know, disp=mod does NOT indicate the dataset exists. . .
MOD simply says when the file is opened, and it does not exist, then create it. If the file exists and is opened MOD, new writes are appended to the end of the file. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
The manual I linked to is a bit ambiguous as to whether the data set is deleted if it is new (i.e,, not pre-existing) or only if it is NEW (i.e., allocated with DISP=NEW). As Mr. Woodger says, however, the data set exists after the step is run.
At this point it is perhaps not inappropriate to ask that the TS provide some evidence that the step actually did abend; as we all know from sorry experience, "abend" is a term frequently misused by querents on this board. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
The JCL snippet could be either, it looks like it was initially used to define the dataset, then edited down. Could now be MOD,DELETE,DELETE if the dataset doesn't exist, but then how to know how many records...
We need the TS back. He is telling us stuff, and not telling us stuff, so we can only speculate.
For instance, if he says there are 100 records on the dataset, maybe he's just looking at a record count in the dump, or a display after the records are written? I tried asking what his blocksize is, but no response. Unless the blocksize=lrecl I don't see how there would be 100 records on the dataset if the file hasn't been closed (because the current buffer would not have been written). If effectively unblocked, he'd see 100, otherwise fewer.
Perhaps he's just looking at counts, and Jose was right. |
|
Back to top |
|
|
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
Hello,
Like Dick mentioned that the first time the default will be DISP=(NEW,DELETE,DELETE), in this case the disposition is DISP=(MOD). If the file doesn't exist it will create the file but if you don't put a termination disposition it will be deleted at normal or abnormal termination. When you run again the job it will try to create the file but if it doesn't have a termination disposition of KEEP it will be deleted again. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Got that bit Jose, thanks.
What was potentially gumming-up the works was the TS saying
Quote: |
O/P file was written 100 recs onto it
|
Which kind of implies without enormous certainty that the dataset existed after the "abend".
It is certainly possible you got the answer right, Jose. Without the TS, we won't know. |
|
Back to top |
|
|
|