There are two types of fields in RACF profiles:
- normal fields, that have one value
- repeated fields, that can have zero (in some cases), one or more value.
An example of repeated fields is connect group information. The field CONGRPNM contains one or more connect group names (in chronological order). The field CONGRPCT specifies the number of rows (entries) in this list.
Repeated fields can also be found in combinations, where several fields should be interpreted together. We refer to these as repeat groups. The alphabetical list of connect group names is available in CGGRPNM, CGFLAG2 shows if the user has group special in this group.
You can see the field names using TEMPLATE command in ISPF. The fields in a repeat group are tied together with the (count) field name in the Group column.
Anyway, the SORTLIST commands prints the entries of repeat group fields in lines AFTER the main fields, with the normal fields left empty. So it may look like there are empty lines generated, but these are lines with a blank value of the repeated field. In your case, you printed the grpspec repeated field, with is blank for each connect group (unless the user has group special in a group).
You can use the NEWLIST RETAIN parameter to repeat the normal fields on each of these follow-up lines. You could also define a BOOLEAN field if any of the connect groups is defined with special:
define type=racf any_group_special(1,"g",hb) boolean where grpsp
#Support#SupportMigration#ZSecurity