View previous topic :: View next topic
|
Author |
Message |
dennis_J
New User
Joined: 01 May 2010 Posts: 5 Location: Toronto
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
DFSMS Macro Instructions for Data Sets SC26-7408-01
DFSMS Using Data Sets SC26-7410-07 |
|
Back to top |
|
|
dennis_J
New User
Joined: 01 May 2010 Posts: 5 Location: Toronto
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
And now? |
|
Back to top |
|
|
dennis_J
New User
Joined: 01 May 2010 Posts: 5 Location: Toronto
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
dennis_J
New User
Joined: 01 May 2010 Posts: 5 Location: Toronto
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
dennis_J
New User
Joined: 01 May 2010 Posts: 5 Location: Toronto
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
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 |
|
|
|