In article <[EMAIL PROTECTED]>, Lindy Mayfield says... > Have you looked at a dump to see if the variables are returned?
Name and value of the (first) variable are returned. I added the vaiable X and a "say" of the value to my example: /* REXX */ ECODE = x2c("00000003") /* TSVELOC */ NAMEPTR = x2c("00000000") NAMELEN = x2c("00000000") VALUEPTR = x2c("00000000") VALUELEN = x2c("00000000") TOKEN = x2c("00000000") ECT = x2c("FFFFFFFF") RETCODE = x2c("00000000") X = "MY FUNNY VALUE" address linkpgm "IKJCT441 ECODE NAMEPTR NAMELEN VALUEPTR VALUELEN TOKEN ECT RETCODE" say "retcode = "||c2d(RETCODE) say "name = "||storage(c2x(NAMEPTR),c2d(NAMELEN)) say "value = "||storage(c2x(VALUEPTR),c2d(VALUELEN)) say "token = "||c2x(TOKEN) I get: retcode = 0 name = X value = MY FUNNY VALUE token = 00000000 >The doc is a bit fuzzy, you're right, but if I understand correctly the STOKEN is only used for CLIST variables. I didn't check the 1.8 docs, but in the 1.9, 24.6.1 Output from IKJCT441 on Entry Code TSVELOC, it says: > > "TOKEN contains zero, or if CLIST variables are to be returned, TOKEN contains an internal value that identifies the next variable." > The 1.8 docs tell the same story. I didn't notice that. That would mean I can't loop through the variables of a REXX script. Bad luck. Axel. > > > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Axel Miller > Sent: 1. syyskuuta 2008 11:21 > To: IBM-MAIN@BAMA.UA.EDU > Subject: linkpgm "IKJCT441" does not return TOKEN > > I am trying to loop through all variables that are defined in my currently > running REXX script. > > I thought I could use the variable access routing IKJCT441 with entry code > TSVELOC (returns all active variables and their values). > > But the following REXX code does not behave as I expected: > > > /* REXX */ > ECODE = x2c("00000003") /* TSVELOC */ > NAMEPTR = x2c("00000000") > NAMELEN = x2c("00000000") > VALUEPTR = x2c("00000000") > VALUELEN = x2c("00000000") > TOKEN = x2c("00000000") > ECT = x2c("FFFFFFFF") > RETCODE = x2c("00000000") > > address linkpgm > "IKJCT441 ECODE NAMEPTR NAMELEN VALUEPTR VALUELEN TOKEN ECT RETCODE" > > say "retcode = "||c2d(RETCODE) > say "name = "||storage(c2x(NAMEPTR),c2d(NAMELEN)) > say "token = "||c2x(TOKEN) > > > If I understand the documentation right, a call to IKJCT441 with a zero'ed > TOKEN on input should return the first variable and fill the TOKEN. The > next call to IKJCT441 would than return the next variable and another > TOKEN. > > The output from the above code on our z/OS 1.8 is: -------------------------------------------------------------- Axel Miller PPI AG Informationstechnologie Wall 55 24103 Kiel Telefon: 0431 / 888 10 - 1 43 Telefax: 0431 / 53 53 - 1 11 E-Mail: mailto:[EMAIL PROTECTED] Web: http://www.ppi.de -------------------------------------------------------------------------- Registergericht: Amtsgericht Hamburg, HRB 76312 Vorstand: Uwe Prieß (Vorsitzender), Andreas Achner, Thomas Reher Aufsichtsratsvorsitzender: Peter Pape ---------------------------------------------------------------------- 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