14
© 2002. Xephon UK telephone 01635 33848, fax 01635 38345. USA telephone (303) 410 9344, fax (303) 438 0290.
profile that can be repeated within that profile. A field that belongs to
a repeat group is defined only once in the template, but can be repeated
as many times as necessary within the actual profile. A count field
precedes the repeat group in the profile, indicating how many of these
groups follow.
A typical use of repeat groups is the list of groups and connect
information in a user profile that the user is connected to.
The program automatically recognizes fields retrieved in repeat group
format and displays each occurrence separately.
To select ALL occurrences, you should omit the DATA() parameter;
a count variable and numbered variables will be created as described
in the section on repeat groups in ‘CLIST variables’ above.
To select a specific occurrence within a repeat group (for example, to
retrieve connect information from a user profile for a specific RACF
group), specify in the DATA() parameter a value to be compared to the
first named field in FIELDS(). When an occurrence is found with this
field matching, values for the same relative occurrence will be
retrieved for all other fields named in FIELD().
This is best explained by example:
MCINTY GET PR(FRED) FI(CGGRPNM,CGAUTHOR,CGAUTHDA.P) DATA(SYS1)
Each occurrence of the CGGRPNM repeat group is scanned for a
match with ‘SYS1’. When one is found, the remaining repeat group
fields (CGAUTHOR and CGAUTHDA) are scanned and the values
from the same relative occurrence are retrieved.
This example retrieves the group name (CGGRPNM), connect owner
(CGAUTHOR), and connect date (CGAUTHDA) for the connect
entry ‘SYS1’ in FRED’s user profile (default CLASS=USER). ). The
date is converted from packed to character because of the .P suffix.
MCINTY stores these fields in variables named CGGRPNM1,
CGAUTHOR1, and CGAUTHDA1 respectively. Note the numeric
suffixes on the variables created because the fields are repeat groups
(see ‘Specific occurrences’ earlier). The CGGRPNM variable will
contain the value 1 to indicate how many numbered variables were
created. If FRED was not connected to group SYS1 then CGGRPNM
would be zero and no other variable would be created.
Comentarios a estos manuales