Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10326
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: 6968
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us