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

Dynalloc a DSN NEW,CATLG,DELETE in PLI without asm


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Tue Jun 05, 2012 3:04 am
Reply with quote

Hello

Is there a way to dynalloc a dataset in PLI, where normal + abnormal disp are different e.g. NEW,CATLG,DELETE? bpxwdyn and tso alloc cannot do this.

It´s possible to do this using an asm program that builds parameters and calls scv99. I try to avoid this, but it seems it´s not possible.#

Any hints?
thanks
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 05, 2012 11:55 am
Reply with quote

Chapter 6. Using data sets and files

Enterprise PL/I for z/OS Programming Guide
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Tue Jun 05, 2012 12:18 pm
Reply with quote

thanks

the title attribute on open statement does not allow to specify an abnormal termination option

publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/i1191451/2.3.5?DT=20110908014642#HDRDEFQSAM
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 05, 2012 12:26 pm
Reply with quote

I dont see a restriction to use 1 of the following parameters twice :

KEEP, DELETE, CATALOG, or UNCATALOG
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Tue Jun 05, 2012 1:00 pm
Reply with quote

thanks, i´ll try. at least it´s good to know that pli can do dynalloc nowadays.
(the "what´s new" section had no hint. it was provided with a ptf...)
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Tue Jun 05, 2012 10:11 pm
Reply with quote

i´ve tested it. you cannot use the parameter twice. you´ll get an error message.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 05, 2012 10:19 pm
Reply with quote

Well, show us all you tried. Maybe I could learn something about that try out.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Jun 05, 2012 10:26 pm
Reply with quote

If you think about it, you see why there is only two parameters.

The dynamic allocation is a stand alone function. It has nothing to do with anything else going on in your program.

Once the file is allocated, that function is done, finis.

If you really need to delete the file on an abnormal termination of your job step, then add another step to your job to dynamically delete the file on abnormal execution of the previous step.
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Tue Jun 05, 2012 10:45 pm
Reply with quote

daveporcelan wrote:
If you think about it, you see why there is only two parameters.

The dynamic allocation is a stand alone function. It has nothing to do with anything else going on in your program.

Once the file is allocated, that function is done, finis.

If you really need to delete the file on an abnormal termination of your job step, then add another step to your job to dynamically delete the file on abnormal execution of the previous step.


allocated and function done? yes, but 3rd disp is not set to a value i want.

deleting in a 2nd step does not work. usually i don´t know what datasets a program allocates using dynalloc. dataset-names and number of datasets may have dependencies on date, time, input parms etc.

we have an asm svc99 interface that allows dynalloc new,catlg,delete or any other disp.
within tso tmp ikjeft1b this is used very often. if the prog abends, then the step abends and dataset are deleted. we want to migrate away from such asm-utilities.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Jun 05, 2012 10:51 pm
Reply with quote

Quote:
this is used very often

we want to migrate away from such asm-utilities


Why would you want to migrate away from something that is used very often and works?

Sounds like a sound management decision.
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Tue Jun 05, 2012 10:57 pm
Reply with quote

daveporcelan wrote:
Quote:
this is used very often

we want to migrate away from such asm-utilities


Why would you want to migrate away from something that is used very often and works?

Sounds like a sound management decision.


A HLL Program is easier to maintain than a complex asm.
Asm knowledge is decreasing icon_sad.gif
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Jun 05, 2012 10:59 pm
Reply with quote

When was the last time this program needed to be maintained?

System programmers should always be around.

Good luck.
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Tue Jun 05, 2012 11:05 pm
Reply with quote

daveporcelan wrote:
When was the last time this program needed to be maintained?

System programmers should always be around.

Good luck.


maybe a decade ago. it´s very stable.
unsupported software may be very stable too. but if anything breaks you´re out of luck.
so doing preemptive maintenance is not a bad idea.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Jun 05, 2012 11:25 pm
Reply with quote

daveporcelan wrote:
System programmers should always be around.

But in the future, they won't know anything except how to cadge sort control decks that they don't understand. We're already seeing that.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Jun 05, 2012 11:48 pm
Reply with quote

much in life has been improved by

more sophisticated schedulers which made it easier to generate dsn's using variables:
dates, times, counts any user defined system variable...

Sort utilities, rexx can create JCL and utility control cards.


many of the reasons that dynamic allocation became the rage in application programming,
have disappeared.

maybe it is time to rethink the nearly-unaudible-trail left by dynamic allocation?

use of an EXEC parm (generated on the fly in preceding job) could control how many FDs are opened.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts Delete file row if blanks in the firs... DFSORT/ICETOOL 5
Search our Forums:

Back to Top