This works for me. Try using a string function around the __JOBCARD variable. Just like you did in your script where you used UPS and RTRIM. Echo JobCard = ![RTRIM(__JOBCARD)] John Zoltak North American Mfg Co > -----Original Message----- > From: Tony Furnivall [SMTP:[log in to unmask]] > Sent: Thursday, May 07, 1998 9:31 AM > To: [log in to unmask] > Subject: [HP3000-L] Managing variables that contain JCL (with a > !) > > I know that this keeps cropping up, but I can't for the life of me > remember > the effective way to do this. > > I'm processing some files containg JCL (with the ! in column 1), and I > need > to parse out and modify the !JOB line. How can I get the CI to ignore > the ! > that immediately precedes the JOB, but still regard the entire line as > a > single variable? > > The snippet in question reads something like this: > > While not __jobcardfound and finfo("jobtemp","eof")>0 do > input __jobcard<jobtemp > setvar __jobcard rtrim("!__jobcard") > if pos("JOB","ups("!__jobcard")>0 then > echo JOB card found > echo !__jobcard > > <deletia> > > The problem is that the contents of __jobcard are > !JOB MYJOB, etc > > and when I try and echo the variable __jobcard, it tries to evaluate > the > !JOB part and (understandably) complains! (no dereferencing intended) > > I've tried echo ![!__jobcard], but no dice. If i try !!__jobcard, then > all I > get is the literal "!__jobcard". > I know there's a way, but I'm stumped, and it's a long way to go til > quitting time! > Tony