Hans, Try this:
/* REXX */ arg debugopt if debugopt = "DEBUG" then trace all iobuff = "LIB SDSNCLST [EMAIL PROTECTED]" parse var iobuff . varname varvalue . say "variable name: "varname say "Variable Valu: "varvalue dsn. = "" dsn.0 = 0 do forever parse var varvalue dsnqual"."varvalue if dsnqual = "" then leave dsn# = dsn.0 + 1 dsn.dsn# = dsnqual dsn.0 = dsn# if pos("@",dsnqual) > 0 then sub# = dsn# end varvalue = "'" do i = 1 to dsn.0 dsnqual = dsn.i if i /= sub# then varvalue = varvalue||dsnqual"." else do ll = pos("@",dsnqual)-1 rl = length(dsnqual)-ll-1 varvalue = varvalue"'"left(dsnqual,ll)"||"right(dsnqual,rl)"'." end end if right(varvalue,1) = "." then varvalue = left(varvalue,length(varvalue)-1) varvalue = varvalue"'" gprclient = "PRI" gprsms = "B" interpret "varvalue = "varvalue say "varvalue = "varvalue exit Chuck -----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Visser, Hans (PinkRoccade Infrastructure Services Technisch Specialist) Sent: Friday, May 11, 2007 7:22 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: problem substituting variables ---------------------------------------------------------------------- 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