Have you looked at a dump to see if the variables are returned?  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."

Have a look again, because it does work for me.

Cheers,
Lindy



-----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:

retcode = 0 
name    = ECT 
token   = 00000000

It seems that IKJCT441 returns the first variable (ECT) but the token 
value is still zero, so I can't use it for the next call to IKJCT441.

Any ideas?

Axel.
--------------------------------------------------------------
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

----------------------------------------------------------------------
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

Reply via email to