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
 

 

auxilary index for vsam and what ACB and RPL's are required

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
dennis_J

New User


Joined: 01 May 2010
Posts: 5
Location: Toronto

PostPosted: Sat May 01, 2010 6:49 pm    Post subject: auxilary index for vsam and what ACB and RPL's are required
Reply with quote

Hello. I am writing an assembler program to process a KSDS that has one secondary index. I have defined the vsam cluster, secondary index and path. In the assembler program how many ACBS and RPLs do I code? Do I code one for the primary (an ACB and RPL) and a second ACB and RPL for the secondary path or do I code only one ACB and 2 RPLs? Also I need a little more detail on the DD statements required. Do I have one DD for the primary and a second for the path with a name that is the same as the primary but with a 1 on the end and how does this relate to the prior question with regard to the number of ACBs and RPLs? Do I code a name parameter in the define cluster and define AIX for IDCAMS? In the program what do I open if processing by way of the AIX? Hope you can shed some light on this subject as I have been thru some manuals and nowhere does it explain this. Thanks Dennis_j.
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


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

PostPosted: Sat May 01, 2010 7:41 pm    Post subject:
Reply with quote

DFSMS Macro Instructions for Data Sets SC26-7408-01

DFSMS Using Data Sets SC26-7410-07
Back to top
View user's profile Send private message
dennis_J

New User


Joined: 01 May 2010
Posts: 5
Location: Toronto

PostPosted: Sun May 02, 2010 7:05 pm    Post subject: Re: auxilary index for vsam and what ACB and RPL's are requi
Reply with quote

dennis_J wrote:
Hello. I am writing an assembler program to process a KSDS that has one secondary index. I have defined the vsam cluster, secondary index and path. In the assembler program how many ACBS and RPLs do I code? Do I code one for the primary (an ACB and RPL) and a second ACB and RPL for the secondary path or do I code only one ACB and 2 RPLs? Also I need a little more detail on the DD statements required. Do I have one DD for the primary and a second for the path with a name that is the same as the primary but with a 1 on the end and how does this relate to the prior question with regard to the number of ACBs and RPLs? Do I code a name parameter in the define cluster and define AIX for IDCAMS? In the program what do I open if processing by way of the AIX? Hope you can shed some light on this subject as I have been thru some manuals and nowhere does it explain this. Thanks Dennis_j.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Sun May 02, 2010 7:06 pm    Post subject:
Reply with quote

And now?
Back to top
View user's profile Send private message
dennis_J

New User


Joined: 01 May 2010
Posts: 5
Location: Toronto

PostPosted: Sun May 02, 2010 9:45 pm    Post subject:
Reply with quote

I have searched those manuals and there is no reference to my specific questions. The program I am writing is a called routine that can process by way of the primary or path depending on the parm supplied by the calling program. It looks as though VSAM does all the work depending on the DD statement supplied that points to either the primary KSDS or the path (alternate index). That would mean only one ACB with the DDNAME in the ACB name pointing to the DD name. The problem with this is that if the calling program wants to be able to process by either the KSDS (primary) or the path (alternate) or alternate between either method. Most of the examples I find are for Cobol and that is much different and usually only one access method (primary or alternate), but not both. I am thinking that I will need 2 ACBs each with a different DDNAME parameter, one for the primary pointing to the DD for the KSDS and a second with the DDNAME pointing to the path. Some examples I have found on the internet have a naming convention of AAAAAA and AAAAAA1 for the DD statements with the first being the name of the KSDS and the second being the same name but with a 1 appended to it and a dsn of the path. With this approach there would be only one ACB and RPL and no ARG parameter supplied in the RPL.
Is there a specific chapter or reference within either of these two manuals that I should be looking at?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sun May 02, 2010 10:46 pm    Post subject: Reply to: auxilary index for vsam and what ACB and RPL's are
Reply with quote

FWIW, you can create an SCON (in this example, using R5) to override and point to the passed DDNAME or you can move the passed DDNAME to the ACB label +40 and override the DDNAME defined to the ACB.

I can't speak for the PATH.

Code:
         LA    R5,PRMDDNME         POINT TO PARM-DDNAME
VSAMACB  ACB   AM=VSAM,                                                X
               BLK=ACB,                                                X
               DDNAME=(*,0(R5)),                                       X

_OR_

Code:

         MVC   VSAMACB+40(L'PRMDDNME),PRMDDNME

Note: The second method renders the sub-program non-reentrant.

PRMDDNME must be 8-Bytes in length.

Bill
Back to top
View user's profile Send private message
dennis_J

New User


Joined: 01 May 2010
Posts: 5
Location: Toronto

PostPosted: Sun May 02, 2010 10:53 pm    Post subject: PRMDDNME
Reply with quote

How does the ddname get passed to the program? How does the contents of PRMDDNME get populated? Also what about the ARG for the key, how do I tell the RPL which one to use - primary or alternate?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sun May 02, 2010 11:00 pm    Post subject: Reply to: auxilary index for vsam and what ACB and RPL's are
Reply with quote

You pass the DDNAME as part of a parmlist, addressable off R1. You had said that this is a sub-program, correct?

As far as the ARG, this can be passed in the parmlist from the caller.

The idea is to remove hard-coding (as much as possible) in the sub-program and it's use is driven upon parameters passed in the parmlist, rendering the sub-program as multi-use.

Bill
Back to top
View user's profile Send private message
dennis_J

New User


Joined: 01 May 2010
Posts: 5
Location: Toronto

PostPosted: Sun May 02, 2010 11:58 pm    Post subject: Sounds like a plan
Reply with quote

You are right as the parm list dictates the called program behaviour. I will set up the appropiate address constants for both the DDname and Arg and substitue in the ACB and RPL as you have suggested based on the function code supplied in the parmlist.

Thank you
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Mon May 03, 2010 11:35 am    Post subject:
Reply with quote

DFSMS Macro Instructions for Data Sets SC26-7408-01

One of the ACB MACRF options : AIX

The object to be processed is the alternate index of the path specified by
ddname, rather than the base cluster though the alternate index. For RLS,
the AIX subparameter is invalid. This subparameter has no effect for USS
files.

So you need an ACB/RPL for the base cluster and an ACB/RPL for the
path.
Any ddname can be used for both objects.
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 SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm


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