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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Dynalloc a DSN NEW,CATLG,DELETE in PLI without asm
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 05, 2012 11:55 am    Post subject:
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    Post subject:
Reply with quote

thanks

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

http://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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 05, 2012 12:26 pm    Post subject:
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    Post subject:
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    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 05, 2012 10:19 pm    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Tue Jun 05, 2012 10:26 pm    Post subject:
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    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Tue Jun 05, 2012 10:51 pm    Post subject:
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    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Tue Jun 05, 2012 10:59 pm    Post subject:
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    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Tue Jun 05, 2012 11:25 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Delete record or Reset RC code using ... mpawan Compuware & Other Tools 4 Tue Jul 26, 2016 3:52 pm
No new posts Delete VSAM File Records amitc23 CICS 6 Sun Apr 10, 2016 10:10 am
No new posts DB2 Stored Procedure - Dynamic SQL - ... GuyC DB2 2 Wed Feb 17, 2016 5:10 pm


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