View previous topic :: View next topic
|
Author |
Message |
shanudarling Warnings : 1 New User
Joined: 20 Dec 2006 Posts: 55 Location: noida
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
One question at three places??? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
Can we delete and define ps file in one step? |
is this an interview question |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
A suggestion, from what I understood and from what you posted, can't MOD in DISP be a option? |
|
Back to top |
|
|
shanudarling Warnings : 1 New User
Joined: 20 Dec 2006 Posts: 55 Location: noida
|
|
|
|
Sambhaji wrote: |
One question at three places??? |
By mistake I have posted this ques at three places... sry... |
|
Back to top |
|
|
shanudarling Warnings : 1 New User
Joined: 20 Dec 2006 Posts: 55 Location: noida
|
|
|
|
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. |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
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 |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
Back to top |
|
|
shanudarling Warnings : 1 New User
Joined: 20 Dec 2006 Posts: 55 Location: noida
|
|
|
|
Thanks Everyone.... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why not just use OLD and don't bother deleting or defining... |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Quote: |
OR if not exist then create the new one. |
OLD will not be useful in this context.[/quote] |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Sorry but I'm still dealing with-- what's the context here? |
|
Back to top |
|
|
|