HP3000-L Archives

May 1998, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tony Furnivall <[log in to unmask]>
Reply To:
Tony Furnivall <[log in to unmask]>
Date:
Thu, 7 May 1998 08:31:05 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
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

ATOM RSS1 RSS2