Page 1 of 1

Need guidance in dynamic allocation of VSAM in assembler.

Posted: Sun Jun 21, 2015 7:47 am
by Sukanya A
Hi,

I can be considered very new to assembler programming but for one assignment I need write line of codes in MVS HLASM which can allocate a VSAM dynamically. Can you please guide me on this?

Re: Need guidance in dynamic allocation of VSAM in assembler

Posted: Sun Jun 21, 2015 8:36 am
by Robert Sample
This is NOT a task for someone "very new to assembler programming". Just writing an assembler program to access VSAM is not a simple process and should not be undertaken by anyone with less than 1 to 2 years of Assembler experience. Doing the dynamic access complicates the entire program and hence you need to get several years of experience with assembler before you attempt to dynamically allocate VSAM files.

Re: Need guidance in dynamic allocation of VSAM in assembler

Posted: Sat Jun 27, 2015 7:11 pm
by Robert Sample
One additional point I wanted to add: there is no such thing as "a VSAM" data set. All VSAM data sets are ESDS, KSDS, RRDS, LDS -- and each of them have different attributes. ESDS can be accessed sequentially or through the alternate index (if defined). KSDS can be accessed sequentially, directly (by primary key), or by alternate index (if defined). RRDS can be accessed by relative record number or by alternate index (if defined). LDS can be accessed by RBA. So merely saying you want to dynamically allocate "a VSAM" data set is woefully inadequate in providing information that MUST be known to do the allocation. And if you didn't know about the four types of VSAM data sets, you have no business attempting to allocate one in Assembler; if you did know about the four types of VSAM data sets, you need to learn how to ask questions since you did not provide essential information (such as the VSAM type) in your post.

Re: Need guidance in dynamic allocation of VSAM in assembler

Posted: Sat Jun 27, 2015 9:01 pm
by enrico-sorichetti
unless the TS means ...
allocate as allocate an existing dataset ( at the DD level )
and not
allocate as define a NEW VSAM dataset

in this case the TS should research and read about the use of BPXWDYN