HP3000-L Archives

December 2000, 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:
Jeff Keepers <[log in to unmask]>
Reply To:
Date:
Wed, 6 Dec 2000 13:53:11 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (51 lines)
I would like to thank everyone who responded to my question about pre-process.
Tom Emerson was able to clarify the issue with the following explanation:

   Actually, the STREAMX pre-processor uses ::IF/::ELSE/::ENDIF commands much
   like compilers use similar directives in deciding which code gets compiled.
   If the ::IF clause is satisfied (i.e., returns "true"), then the lines of
   the source job up to a ::ELSE or ::ENDIF are included; if false, they are
   NOT included in the resulting job submission.

   In this particular case, since "flag" is NOT an "N", the second ::ECHO and
   resulting submission of job B is not even processed -- in effect, they are
   treated "as if they weren't in the file to begin with".

   Now, the really screwy thing is, if instead of STREAMX A the job had STREAM
   A, and A had within it a line that said "::assign flag 'N'", then both A and
   B WOULD be streamed -- the inner job "A" would be processed in-line, and the
   resulting re-assignment of the variable "flag" would be tested after "A" was
   processed.



> -----Original Message-----
> From: Jeff Keepers [mailto:[log in to unmask]]
>
> I am documenting a job for the HP3000 that has me confused.
> This job has a
> mixture of pre-process mpex commands and JCL.  As I
> understand how things work,
> when the job is batched, the pre-process mpex commands are
> processed and then
> the JCL commands.  This particular job seems to do things
> different.  The
> following is an example:
>
> ::assign flag = 'Y'
> ::if flag = "Y" then
> ::   echo "flag = Y"
> !   STREAMX A
> ::endif
> ::if flag = "N" then
> ::   echo "flag = Y"
> !    STREAMX B
> ::endif
>
> When job is run, the pre-process code decides if A or B is
> run.  When I look at
> it I would say that it would do all of the pre-process
> commands and then run
> BOTH A and B.  Any insight on why the job does what it does would be
> appreciated.

ATOM RSS1 RSS2