Thanks everyone for all of your help. I've got something that works, even
though it is more crufty than I would like. Past time to move onto the next
bug.
What I found out is that GBLC symbols have a 256 byte limit (at least in
zOS 1.4; I have the zOS 1.6 doc, which says 1024 bytes). Macro input
parameters have a 256 byte limit, too, so my dream of keeping long lists in
a single variable was never going to work out. I wasn't that far over the
limit, and forsee little need for high growth, so my crufty solution just
allows you to pass in up to 4 lists of users, and it concatenates them into
the resulting control block.
I did find a way to trim the leading and trailing quote off the incoming
data before storing it, which made it easier to deal with later.
I still have no love for the Assembler Reference and User's guide. I have
always found that book to be opaque, and it still is, for me. It needs
another 100 small, practical examples. I can just never grasp tough
concepts and tricky syntax without examples.
Invoking code snippet: ---------------------------------------------------
$GRP PRODCNTL,USERS1='T031682 T042407 T046726 T057345 T075851 T078999'
$GRP TESTUSRS, +
USERS1='K001214 K001238 K003142 K003208 K003385 TLEAD01 +
TZ00035 TZ00056 TZ00061 TZ00529 T031682 T042407 T045022 +
T046726 T047542 T056131 T056313 T057345 T059608 T060979 +
T061753 T065238 T065361 T067636', +
USERS2='T068437 T071219 T072918 T075851 T077911 T078676 +
T078999 T079290 T079829 T081658 T081897 T083056 T083239 +
T084039 T085210 T087556 T088009 T088530 T088532 T088583 +
T088740 T092728 T092738 T093433 T093897 T094643', +
USERS3='T095122 T095507 T095556 T096058 T096148 T096199 +
T096255 T096518 T097282 T097579 T097617 T097623 T098914 +
T099268 T099301 T100052'
GRPTABLE $GRPTBL THIS ENTRY MUST FOLLOW ALL $GRP MEMBERS
The $GRP macro:---------------------------------------------------
MACRO
&MACNAME $GRP &NAME,&USERS1='',&USERS2='',&USERS3='',&USERS4=''
.*-------------------------------------------------------------------*
.* *
.* FUNCTION - BUILDS ASSEMBLER TABLE FOR LINKAGE INTO LNKLST LIB. *
.* *
.* EXAMPLE: $GRP LANDUSR,USERS='T12345 TZ99999' *
.* *
.*-------------------------------------------------------------------*
GBLC &GRPNAMES(500)
GBLC &GRPUSERS1(500)
GBLC &GRPUSERS2(500)
GBLC &GRPUSERS3(500)
GBLC &GRPUSERS4(500)
GBLA &GRPCNTR
AIF (T'&NAME NE 'O').GOTNAME
MNOTE 12,'****** NO GROUP NAME ENTERED'
MEXIT
.GOTNAME ANOP
.*
AIF (T'&USERS2 NE 'O').GOTUSER
MNOTE 12,'****** NO USER NAME(S) ENTERED'
MEXIT
.GOTUSER ANOP
.*
&GRPCNTR SETA &GRPCNTR+1
&GRPNAMES(&GRPCNTR) SETC '&NAME'
&END SETA K'&USERS1-2
&GRPUSERS1(&GRPCNTR) SETC '&USERS1'(2,&END)
AIF (K'&USERS2 EQ 0).NOUSR2
&END SETA K'&USERS2-2
&GRPUSERS2(&GRPCNTR) SETC '&USERS2'(2,&END)
.NOUSR2 ANOP
AIF (K'&USERS3 EQ 0).NOUSR3
&END SETA K'&USERS3-2
&GRPUSERS3(&GRPCNTR) SETC '&USERS3'(2,&END)
.NOUSR3 ANOP
AIF (K'&USERS4 EQ 0).NOUSR4
&END SETA K'&USERS4-2
&GRPUSERS4(&GRPCNTR) SETC '&USERS4'(2,&END)
.NOUSR4 ANOP
.END MEND
Finally, the $GRPTBL Macro:---------------------------------------------------
MACRO
&MACNAME $GRPTBL &DSECT=NO
.*-------------------------------------------------------------------*
.* *
.* FUNCTION - BUILDS ASSEMBLER TABLE FOR LINKAGE INTO LNKLST LIB. *
.* *
.* EXAMPLE: $GRPTBL DSECT=YES *
.*-------------------------------------------------------------------*
GBLC &GRPNAMES(500)
GBLC &GRPUSERS1(500)
GBLC &GRPUSERS2(500)
GBLC &GRPUSERS3(500)
GBLC &GRPUSERS4(500)
GBLA &GRPCNTR
AIF ('&DSECT' EQ 'YES').DGEN
.* MNOTE 0,'*** TABLE CONTAINS &GRPCNTR GROUPS'
.*
&I SETA 1
&MACNAME DS 0F ALIGN CONTROL BLOCK TO FULLWORD
.GRPLOOPI ANOP
&NEXT SETA &I+1
AIF (&I EQ &GRPCNTR).LASTGRP
GRP&GRPNAMES(&I) DC A(GRP&GRPNAMES(&NEXT)) POINTER TO NEXT GROUP OR 0
AGO .DIDGRP
.LASTGRP ANOP
GRP&GRPNAMES(&I) DC A(0) POINTER TO NEXT GROUP IS 0
.DIDGRP ANOP
DC A(&GRPNAMES(&I)) POINTER TO AUTH ENTRY
DC CL8'&GRPNAMES(&I)' GROUP NAME
DC AL2(GRPEND&I-GRPUSR&I) LENGTH OF USER LIST
.*
GRPUSR&I EQU *
DC C'&GRPUSERS1(&I) '
AIF (K'&GRPUSERS2(&I) EQ 0).NOUSR2
DC C'&GRPUSERS2(&I) '
.NOUSR2 ANOP
AIF (K'&GRPUSERS3(&I) EQ 0).NOUSR3
DC C'&GRPUSERS3(&I) '
.NOUSR3 ANOP
AIF (K'&GRPUSERS4(&I) EQ 0).NOUSR4
DC C'&GRPUSERS4(&I)'
.NOUSR4 ANOP
GRPEND&I EQU *
*
&I SETA &I+1
AIF (&I LE &GRPCNTR).GRPLOOPI
AGO .END
.*
.DGEN ANOP
GRPTBL DSECT
GRPNEXT DS A POINTER TO NEXT GROUP OR 0
GRPAUTH DS A POINTER TO JOBTRAC AUTH ENTRY
GRPNAME DS CL8 GROUP NAME
GRPUSRLN DS AL2 LENGTH OF USER LIST
GRPUSERS DS 0C BEGINNING OF USER LIST
.END MEND
Regards,
Bob Stark [ProTech - When you're serious about Systems Management]
Consulting, Software, and Training for OS/390, UNIX and Internet
www.protechtraining.com 800-373-9188 x150 412-445-8072
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html