View previous topic :: View next topic
|
Author |
Message |
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Chapter 6. Using data sets and files
Enterprise PL/I for z/OS Programming Guide |
|
Back to top |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
I dont see a restriction to use 1 of the following parameters twice :
KEEP, DELETE, CATALOG, or UNCATALOG |
|
Back to top |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
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 |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
i´ve tested it. you cannot use the parameter twice. you´ll get an error message. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Well, show us all you tried. Maybe I could learn something about that try out. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
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 |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
When was the last time this program needed to be maintained?
System programmers should always be around.
Good luck. |
|
Back to top |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
|