IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

File with Disp=Pass - not deleted after successful execution


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Sat Apr 12, 2008 11:44 pm
Reply with quote

Hi,

I have used DISP=(NEW,PASS,DELETE) for a file and it has been passed but not deleted at the end of the job (Successful execution). Could any one explain why?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Apr 12, 2008 11:59 pm
Reply with quote

Was there any other references to that DSName (before or) after the one you are showing?
Back to top
View user's profile Send private message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Sun Apr 13, 2008 12:13 am
Reply with quote

Hi,

I am creating this Dataset using DFSORT in the first step
DSN=MY.PASS.DATASET
DISP=(NEW,PASS,DELETE),
UNIT=SYSDA,
SPACE=(CYL,(500,500),RLSE),
DCB=(LRECL=3000,RECFM=FB,BLKSIZE=0)

and then using it in the next step (i.e, Program execution Step). There are no more steps. Please get back if you need more info
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Apr 13, 2008 12:27 am
Reply with quote

Hello,

You need to post the "next step" as well.
Back to top
View user's profile Send private message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Sun Apr 13, 2008 12:43 am
Reply with quote

Hi Dick,

please see my execution step below
Execution step:

//S030 EXEC PGM=PROGRAM,COND=(0,LT)
//STEPLIB DD DSN=MY.LOADLIB,DISP=SHR
//EIN1 DD DSN=MY.PASS.DATASET,
// DISP=SHR
//RMCUST DD DSN=INPUT.FILE.FROM.ANOTHER.JOB,
// DISP=SHR
//AUS1 DD DSN=MY.OUTPUT.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=(3390,12),
// SPACE=(CYL,(500,800),RLSE),
// DCB=(RECFM=FB,LRECL=570,BLKSIZE=0)
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Apr 13, 2008 12:48 am
Reply with quote

Hello Senthil,

Look at the 3rd sysout and see how JES disposed of the file.

This
Quote:
//EIN1 DD DSN=MY.PASS.DATASET,
// DISP=SHR
does not make sense to me. If the file is not needed, the disp should probable be (old,delete,delete). If the file is to be preserved so that this step could be restarted (rather than running from the beginning), the disp should be (old,delete,catlg). I can think of no reason to use shr in a newly created, passed dataset.

If this is truly a "throw-away" dataset, you could use a dsn of &&MYPASS.
Back to top
View user's profile Send private message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Sun Apr 13, 2008 1:04 am
Reply with quote

Hi Dick,

Thanks for the explanation. I understood. But i still have one doubt. The above job has run 5 times and it is throwing the problem now only. Still wonder if this depends on some other factor also?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Apr 13, 2008 1:33 am
Reply with quote

Hello Senthil,

Quote:
Still wonder if this depends on some other factor also?
Probably. The way the jcl is/was(?) running could cause problems eventually - maybe just now.

It is possible that there are still multiple other copies of this file still on dasd.

There may have been some change to the SMS rules.

You may want to talk with the storage admin prople and make sure that this dataset is not "just lying around" on some other dasd volumes.

Just because a job runs to eoj does not mean that some silent problems are not happening. Many organizations have jcl standards that dis-allow such things as well as having a technical review of the jcl before it may be promoted to production.
Back to top
View user's profile Send private message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Sun Apr 13, 2008 1:42 am
Reply with quote

Hi Dick,

I understood. Thanks much for your explanations.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun Apr 13, 2008 1:55 am
Reply with quote

Kind of make me think that the original problem and the following discovery that it was suddenly not being deleted is because the sixth time it was run the allocation could not find a volume where it had not already been created previously......
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Sun Apr 13, 2008 2:17 am
Reply with quote

Hi,

Little more observaion for this
Quote:
The above job has run 5 times and it is throwing the problem now only. Still wonder if this depends on some other factor also?


Did COND in this
Code:
//S030 EXEC PGM=PROGRAM,COND=(0,LT)
allowed to run this step in 'those' 5 runs ?
Back to top
View user's profile Send private message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Sun Apr 13, 2008 2:25 am
Reply with quote

Yes. All the 5 times, it allowed to run till the end.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Apr 13, 2008 3:56 am
Reply with quote

Hello,

Quote:
Did COND in this Code:
Code:
//S030 EXEC PGM=PROGRAM,COND=(0,LT)

allowed to run this step in 'those' 5 runs ?

Quote:
Yes. All the 5 times, it allowed to run till the end.
Yup, i would expect this. Nothing is "wrong", so the job runs "successfully". Not really, but no error is thrown.

You may want to review other jobs that pass datasets that are not properly disposed of that may be waiting to cause some kind of surprise later.

Quote:
because the sixth time it was run the allocation could not find a volume where it had not already been created previously......
While at a client site for a few days for something completely unrelated, we were interrupted because some critical job "went down" and needed attention. Seems like a situation similar to this had occurred and the problem file had been propagated across every volume in the center (except the spool, sysres, and other system support volumes). This was when everything was done by the unit parameter (befoer sms) and almost everything in the center was visable to SYSDA. . .

Quote:
I understood. Thanks much for your explanations.
You're welcome icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sun Apr 13, 2008 2:37 pm
Reply with quote

Quote:
If this is truly a "throw-away" dataset, you could use a dsn of &&MY.PASS.DATASSET


I always thought that && datasets could not be more than one qualifier.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Apr 13, 2008 4:44 pm
Reply with quote

Hi Expat,

Quote:
I always thought that && datasets could not be more than one qualifier.

Good catch! I got carried away with the copy/paste icon_redface.gif

The dsn above has been corrected.

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top