Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we delete and define ps file in one step?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Can we delete and define ps file in one step?
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Mon Sep 14, 2009 3:30 pm    Post subject: Reply to: Can we delete and define ps file in one step?
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

Senior Member


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

PostPosted: Mon Sep 14, 2009 3:36 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

With thanks to superk.

http://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    Post subject:
Reply with quote

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

Global Moderator


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

PostPosted: Mon Sep 14, 2009 5:02 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Mon Sep 14, 2009 5:29 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us