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
 

 

How to dynamically allocate/deallocate a QSAM File?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
sandhyarenu

New User


Joined: 04 Jan 2007
Posts: 16
Location: India

PostPosted: Thu May 22, 2008 11:12 am    Post subject:
Reply with quote

Hi,

Could someone help me with the assembler command to dynamically allocate/deallocate a QSAM File ? I am not sure what these keywords S99VERB,S99VRBIN could mean.
Back to top
View user's profile Send private message

bharath_gct2002

New User


Joined: 08 Oct 2007
Posts: 27
Location: Dallas, TX

PostPosted: Thu May 22, 2008 8:47 pm    Post subject:
Reply with quote

http://publib.boulder.ibm.com/infocenter/zos/v1r9/topic/com.ibm.zos.r9.ieaa800/sjdynal.htm#sjdynal

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.ieaa800/reqsvc.htm

These are some good documentations on DYNALLOC from IBM. It has answers to all your questions.

Please let me know this helps.
Bharath
Back to top
View user's profile Send private message
ironmike

New User


Joined: 07 Aug 2005
Posts: 33

PostPosted: Fri May 23, 2008 7:45 am    Post subject:
Reply with quote

As the Count of Monte Christo said, "It's complicated..."

You have to build a dynamic allocation parameter block by populating it with the dynamic allocation text units you want to use. There are different types of text units that describe different types of files or devices, even SYSOUT. You then issue the DYNALLOC macro or SVC 99.

Look at the above referenced documents, and @ IBM macros IEFZB4D0 and IEFZB4D2.

Start simple, just try to allocate the file, then if that works try a separate request to free the file.
Back to top
View user's profile Send private message
sandhyarenu

New User


Joined: 04 Jan 2007
Posts: 16
Location: India

PostPosted: Mon May 26, 2008 11:17 am    Post subject:
Reply with quote

Thanks much for all the help !! icon_smile.gif Will try out !
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Wed Oct 01, 2008 6:05 pm    Post subject:
Reply with quote

I am still look for the assembler code to be doing th edynamic allocation. Does anyone have a code examples?
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Wed Oct 08, 2008 8:35 pm    Post subject:
Reply with quote

So is anyone having a reply with the examples?
Thank you very much for your informations.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed Oct 08, 2008 9:07 pm    Post subject:
Reply with quote

The manual in the first link given above has a section with sample Assembler code (Figure 70) as well as descriptions of the parameters and error codes.
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Wed Oct 08, 2008 9:36 pm    Post subject:
Reply with quote

Thank you... but I cannot be seeing figure 70 anywhere
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Oct 09, 2008 2:26 am    Post subject:
Reply with quote

Expand the Chapter "Requesting Dynamic Allocation Functions", you'll see "Example of a Dynamic Allocation Request" listed as a sub-topic.
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Thu Oct 09, 2008 3:14 pm    Post subject: Reply to: How to dynamically allocate/deallocate a QSAM File
Reply with quote

Thank you for your help. i have now found the example and have tried it exactly as it is being written.

It gives a return code of 3952 which I cannot find being mentioned. Does anyone know if the code is being accurate?
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Thu Oct 09, 2008 7:46 pm    Post subject:
Reply with quote

Ok, so now I have go this example to seem to work. the return code is being 0.

But this allocates a dataset and gets the DD name from somewhere. but what is this meaning? I want to allocate a dataset to a ddname in my program so that then I can be opening and writing to the ddname. If only they were providing an example of this. it is seeming that so far they have only told half of the story book.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Oct 09, 2008 11:14 pm    Post subject:
Reply with quote

Hello,

Quote:
But this allocates a dataset and gets the DD name from somewhere. but what is this meaning?
It does not get the ddname "from somewhere" - you specified the ddname in your code.

It may be a good investment of your time to completely understand the code you now have working before you try to do anything else.
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Fri Oct 10, 2008 3:55 pm    Post subject:
Reply with quote

According to the documentations and comments in the code, this code IS retriving the DD name. The DD name it is NOT being specified anywheres in the code.
This is not making much sense to me but that is what it is saying.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Oct 10, 2008 4:55 pm    Post subject:
Reply with quote

Is the DD name SYSnnnnn ?
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Fri Oct 10, 2008 6:19 pm    Post subject:
Reply with quote

What are you meaning? I am providing no DD name because the cod eis being for returning a DD name. There is being no DD name returnd, and why should there? i need the program to be providing a DD name for the file to be allocated to. that is being the whole point of the dynamic allocation.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Oct 10, 2008 7:22 pm    Post subject:
Reply with quote

From the Authorized Assembler Services Guide with emphasis added by me:
Quote:
25.1 An Allocation Overview

Allocation is the process by which the system assigns, or allocates, I/O resources to your job. An I/O resource is a ddname-data set combination, with any associated volumes and devices.

And further from the same manual:
Quote:
25.2.2.7 Considerations When Requesting Dsname or Pathname Allocation

The following topics describe how the system processes your dsname allocation request based on the attributes of your allocation environment and your request.


| Allowing the System to Generate a Ddname: If you do not specify a ddname,
| the system generates one. The ddname created consists of the characters
| 'SYS' followed by five digits, with a maximum value of SYS65535.

You're getting a DDNAME whether or not you wanted one, whether or not you asked for one. The first quote says you cannot do a dynamic allocation without using a DDNAME. The second quote tells you what the DDNAME will be if you don't specify one.

Quote:
There is being no DD name returnd, and why should there?
The answer to your question is because it will be created by the system as part of dynamic allocation -- period.
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Fri Oct 10, 2008 7:25 pm    Post subject:
Reply with quote

Thank you. Ok. So a DD is returned if I do not specify one. That will be ok but in the block where is returnd the DD name I am seeing just spaces. Unless in the assembler language I need to be doing something different to be seeing what SVC 99 has returned.

Is there being a special way of seeing the values returned after such a call as this?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Oct 10, 2008 7:32 pm    Post subject:
Reply with quote

Since you haven't shown any code, it's pretty much impossible to say what's going on. However, the manual is quite clear -- a DDNAME is allocated, so presumably the DDNAME is available somewhere. I would recommend passing a DDNAME to the dynamic allocation routine, and once you get the zero return code perhaps forcing a dump to find out where that name is stored.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Oct 10, 2008 9:16 pm    Post subject:
Reply with quote

Hello,

Quote:
I am providing no DD name because the cod eis being for returning a DD name.
Maybe we are looking at different code. . . The code i looked at specified DD name.

Please post the part of your code that refers to ddname. When posting code, use the "Code" tag for readability.
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Mon Oct 13, 2008 4:41 pm    Post subject:
Reply with quote

This is the code with the 8 chars for the DD name:

Code:
*                                           
RBLEN    EQU (S99RBEND-S99RB)               
DSNTU    DC    AL2(DALDSNAM)               
         DC    X'0001'                     
         DC    X'000C'                     
         DC    C'SWD.TEAMG.SKELS'           
STATUSTU DC    AL2(DALSTATS)               
         DC    X'0001'                     
         DC    X'0001'                     
         DC    X'08'                       
RETDDN   DC    AL2(DALRTDDN)               
         DC    X'0001'                     
         DC    X'0008'                     
         DS    8X                           
         IEFZB4D0                           
         IEFZB4D2                           
*                                     


How I am querying these 8 characters after the SVC 99 call I am not being sure.
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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