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

Can we delete and define ps file in one step?


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

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Mon Sep 14, 2009 3:05 pm
Reply with quote

Can we delete and define ps file in one step?

The req is:-
I have to check in a jcl for a file if exist then delete the file and cerate the new, OR if not exist then create the new one.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Sep 14, 2009 3:09 pm
Reply with quote

One question at three places??? icon_eek.gif icon_eek.gif icon_eek.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Sep 14, 2009 3:30 pm
Reply with quote

Quote:
Can we delete and define ps file in one step?


is this an interview question icon_question.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Mon Sep 14, 2009 3:36 pm
Reply with quote

A suggestion, from what I understood and from what you posted, can't MOD in DISP be a option?
Back to top
View user's profile Send private message
shanudarling
Warnings : 1

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Mon Sep 14, 2009 3:41 pm
Reply with quote

Sambhaji wrote:
One question at three places??? icon_eek.gif icon_eek.gif icon_eek.gif


By mistake I have posted this ques at three places... sry...
Back to top
View user's profile Send private message
shanudarling
Warnings : 1

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Mon Sep 14, 2009 3:46 pm
Reply with quote

It's not a interview question.

Using Disp=mod, we have to use 2 steps. 1st for delete and 2nd for create. which is different from requirement. I wnat delete and define in one step. icon_confused.gif
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Mon Sep 14, 2009 4:11 pm
Reply with quote

Shanu,
You can try the following

Code:
//STEP0001 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
  DELETE MYSEQ
  IF LASTCC EQ 8 THEN SET MAXCC=0
  ALLOCATE DATASET(MYSEQ) NEW REUSE CATALOG -
  UNIT(SYSDA) RECFM(F B) LRECL(80) BLKSIZE(0) -
  SPACE(10,10) CYLINDERS
/*
//*
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Mon Sep 14, 2009 4:13 pm
Reply with quote

With thanks to superk.

www.ibmmainframes.com/about4103.html
Back to top
View user's profile Send private message
shanudarling
Warnings : 1

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Mon Sep 14, 2009 4:35 pm
Reply with quote

Thanks Everyone....
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Sep 14, 2009 5:02 pm
Reply with quote

why not just use OLD and don't bother deleting or defining...
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Mon Sep 14, 2009 5:17 pm
Reply with quote

Quote:
OR if not exist then create the new one.


OLD will not be useful in this context.[/quote]
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Mon Sep 14, 2009 5:29 pm
Reply with quote

Sorry but I'm still dealing with-- what's the context here?
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 7
No new posts DELETE SPUFI DB2 1
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 DSNTIAUL driven delete IBM Tools 0
Search our Forums:

Back to Top