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

while submitting the job first time the file does not exist.


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

New User


Joined: 11 Jul 2008
Posts: 10
Location: Chennai

PostPosted: Tue Jul 22, 2008 11:06 am
Reply with quote

Hi i have created a jcl in the following format

deleting a file...(file01)

create a file...(file01)

populate some values in it.


my question is while submitting the job first time the file does not exist to delete..So it shows error.what i have to do.?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jul 22, 2008 11:11 am
Reply with quote

Ramesh,

Use the "Code" option provided here instead of attaching screenshots.

Quote:
So it shows error.what i have to do.?

What error it is showing?

Thanks,
Arun
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Tue Jul 22, 2008 11:17 am
Reply with quote

Ramesh,

Please post the error that you are getting.

I suppose there won't be any error because DISP option MOD would create the dataset if it is not existing and in this case it would be deleted even the job abends or does not abend for some reason.

Cheers
Agni
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Jul 22, 2008 11:38 am
Reply with quote

You are using two steps with the same name step1 change it and check . Otherwise mod,del,del shouldn't throw any error even if there is no dataset to delete
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Tue Jul 22, 2008 11:53 am
Reply with quote

Hi,
Prasanthhere wrote:
You are using two steps with the same name step1 change it and check .
This won't create any problem, yup but in SYSOUT, if JOB gets abended, it would be tough to find which 'step1' is which step ?

Well, something else is there which is still not clear..JOBs are working for me at my shop,TS need to post the error message as asked earlier.
Back to top
View user's profile Send private message
srramesh
Currently Banned

New User


Joined: 11 Jul 2008
Posts: 10
Location: Chennai

PostPosted: Tue Jul 22, 2008 12:47 pm
Reply with quote

here i have attached the code n respective error msg
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Tue Jul 22, 2008 12:52 pm
Reply with quote

Hi,

Did u tried with changing the step name.

Regards
R KARTHIK
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jul 22, 2008 12:57 pm
Reply with quote

Ramesh,

As the error message says, provide the SPACE parameter in the first step.

Thanks,
Arun
Back to top
View user's profile Send private message
srramesh
Currently Banned

New User


Joined: 11 Jul 2008
Posts: 10
Location: Chennai

PostPosted: Tue Jul 22, 2008 12:59 pm
Reply with quote

@karthik

yes.. i tried
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Jul 22, 2008 1:00 pm
Reply with quote

Hi,

if the file does not exist, just code the space and unit parameter.
SPACE=(TRK,(0))


Gerry
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Tue Jul 22, 2008 1:19 pm
Reply with quote

Hi,

U have to give space parameter.

see the belo example

Code:

//PSTP0010 EXEC PGM=IEFBR14                       
//E2S1SRT  DD DSN=&PFXEGL..DSEME2S1.EUSDGRP.SRT,   
//            DISP=(MOD,DELETE,DELETE),           
//            SPACE=(CYL,(1,1)),                   
//            UNIT=SYSDA                 
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jul 22, 2008 2:57 pm
Reply with quote

I must admit that I prefer IDCAMS for pre process deletes because it will delete a migrated file without recall.
Back to top
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Tue Jul 22, 2008 6:40 pm
Reply with quote

Quote:
here i have attached the code n respective error msg


Hi ,

I have tried the same code what you mentioned , It perfectly ran for me . Please find the below code and output message .

//STEPDEL1 EXEC PGM=IEFBR14
//FILE1 DD DSN=TFPZ.TEST5.FILE
//STEPDEL1 EXEC PGM=IEFBR14
//OUTFILE DD DSN=TFPZ.TEST5.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(TRK,(5,3),RLSE),
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
//*

Ouput Message :(In Brief)
STEPDEL1 - STEP WAS EXECUTED - COND CODE 0000
TFPZ.TEST5.FILE DELETED, DDNAME=FILE1
SMS ALLOCATED TO DDNAME (OUTFILE )
DSN (TFPZ.TEST5.FILE
STEPDEL1 - STEP WAS EXECUTED - COND CODE 0000
TFPZ.TEST5.FILE RETAINED DDNAME=OUTFILE

Check it out .
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Tue Jul 22, 2008 7:10 pm
Reply with quote

Interesting !The code worked perfectly for me.
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Tue Jul 22, 2008 7:13 pm
Reply with quote

Chek it out !! hope it gives some insight !

IGD17045I SPACE NOT SPECIFIED FOR ALLOCATION OF DATA SET dsname

Explanation: No space was specified on the JCL or in the data class for
the allocation of the data set.

In the message text:

dsname The data set name.

System Action: The allocation fails.

Application Programmer Response: Correct the space specification in
either the JCL DEFINE statement or in the data class. Then resubmit the
allocation request.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Tue Jul 22, 2008 8:32 pm
Reply with quote

There is nothing intresting.

It is exactly as gcicchet already mentioned some post's before.

If you have a clear look at the JCL of srramesh and Gousiya Mulla,
you could see the difference.

Add space-parameter in the delete-step, and that's it.
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: Tue Jul 22, 2008 10:00 pm
Reply with quote

Hello srramesh,

As you've been asked before - do not use images/screen captures to show your info. Used the "Code" tag on the Reply panel.

If other posts arrive with images, they will be deleted.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Jul 23, 2008 4:02 am
Reply with quote

Hi Gousiya,

your post will not work even though you say it worked.

//STEPDEL1 EXEC PGM=IEFBR14
//FILE1 DD DSN=TFPZ.TEST5.FILE
//STEPDEL1 EXEC PGM=IEFBR14
//OUTFILE DD DSN=TFPZ.TEST5.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(TRK,(5,3),RLSE),
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
//*

In step STEPDEL1 you have not coded any disposition, the only reason it worked is because the file did not exist, no disp defaults to
DISP=(NEW,DELETE), had the file existed it would have resulted in a JCL error, duplicate name.


Gerry
Back to top
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Wed Jul 23, 2008 6:56 pm
Reply with quote

Quote:
had the file existed it would have resulted in a JCL error


Hi Gerry ,

Yes it is , But I was checking for the code mentioned as initial query by srramesh .
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top