> Does that also work at the next level of stem variables? There is no "level of stem variables".
> Userid = "FTPD" > IsStepInit.Userid. = "0" "FTPD." is the tail. The stem end at the first period. If you could get IBM to port OOREXX to TSO then you would be able to have stem variables whose values are stems and do something like IsStepInit.Userid[] = 0 -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Charles Mills [[email protected]] Sent: Thursday, January 28, 2021 11:58 PM To: [email protected] Subject: Rexx stem variable question I either have a misunderstanding of how stem variables work - or perhaps it is just some stupid program bug. I know this basic drill on stem variables: I can say foo. = "bar" and then the value of foo.anything is effectively "bar". Does that also work at the next level of stem variables? Consider the following: Userid = "FTPD" IsStepInit.Userid. = "0" Is IsStepInit.Userid.anything defined? I say StepName = "STEP1" If \ IsStepInit.Userid.Stepname Then ... And I get a "Logical value not 0 or 1" error on the If. A Say shows that the value of IsStepInit.Userid.Stepname is ISSTEPINIT.FTPD.STEP1 rather than the "0" I would expect. Am I misunderstanding how "second level" stem variables work, or should I be looking for some stupid program bug? Should IsStepInit.Userid. = "0" set IsStepInit.Userid.anything to "0" or is that wishful thinking? Thanks, Charles Here is the full TRACE 'R'. Lines 406 and 178/179 are the key pieces. 167 *-* jobname = Strip(Substr(Section, 1,8)) /* SMF30JBN */ >>> "FTPD9" 168 *-* userid = Left(jobname, Length(jobname)-1) >>> "FTPD" 169 *-* If \ DATATYPE(userid, 'A') >>> "0" 170 *-* Call InitializeUserid userid >>> "FTPD" 395 *-* InitializeUserid: 399 *-* userid = Arg(1) >>> "FTPD" 400 *-* If IsUseridInit.userid >>> "0" 402 *-* /* New Userid */ 403 *-* IsUseridInit.userid = TRUE >>> "1" 404 *-* ListOfUserids = ListOfUserids userid /* Append to list */ >>> " FTPD" 405 *-* TotalCompiles.userid = 0 >>> "0" 406 *-* IsStepInit.userid. = FALSE >>> "0" 407 *-* ListOfStepnames.userid. = "" >>> "" 409 *-* Return 172 *-* TotalCompiles.userid = TotalCompiles.userid + 1 >>> "1" 174 *-* /* Step name */ 175 *-* stepname = Strip(Substr(Section,17,8)) /* SMF30STM */ >>> "STEP1" 176 *-* If \ DATATYPE(stepname, 'A') >>> "0" 177 *-* Say "|" || userid || "|" || stepname || "|" >>> "|FTPD|STEP1|" |FTPD|STEP1| 178 *-* Say IsStepInit.userid.stepname >>> "ISSTEPINIT.FTPD.STEP1" ISSTEPINIT.FTPD.STEP1 179 *-* If \ IsStepInit.userid.stepname 179 +++ If \ IsStepInit.userid.stepname 123 +++ Call ReadSMF IRX0034I Error running SMF2MAIL, line 179: Logical value not 0 or 1 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
