All:

I use a  [CHOOSE vopmode FROM #LIST 'TestRun,GoLive'] structure at the top of a master shell file to toggle between live and test target-tables during development.

Conditional PAUSE structures visually confirm results of each major step.

When I'm 'GoLive', I'd like to jump over these PAUSE structures by wrapping them in an [IF vopmode = 'GoLive' THEN GOTO localjumpover ENDIF].

That means one heckuva lot of unique 'localjumpover' LABELs to manage.

Can anyone suggest a means of producing a self-extinguishing, one-shot local LABEL whose literal text may be used repeatedly within a file; or is there a better way to perform a strictly local jump; or can a label value be purged immediately after its use; or is this idea a good enhancement candidate?

**********
FWIW here's one experimental structure whose sole virtue (until the end of the file is reached) appears to be that the default direction of a GOTO statement is down; every '.vlocal' label has the same value at any given point in time. But I hope you can see what I'm getting at.

--Initialize Variables
SET VAR vopmode TEXT = NULL
SET VAR vlocal TEXT = NULL
SET VAR vlocaltemp TEXT = NULL
SET VAR vlocalnum INTEGER = NULL
SET VAR vmessage_local TEXT = NULL

--Set Variables
SET VAR vlocaltemp = 'JUMP'
SET VAR vlocalnum = 0

--Choose Operating Mode
CHOOSE vopmode FROM #LIST 'TestRun,GoLive'
.
.
.
--Conditional PAUSE Structure #1
IF vopmode = 'GoLive' THEN
   SET VAR +
     vlocal = .vlocaltemp, +
     vlocalnum = (.vlocalnum + 1), +
     vlocal = (.vlocaltemp + (CTXT(.vlocalnum)))
   GOTO &vlocal
ENDIF

PAUSE 2 USING 'This is test pause #1' +
CAPTION 'Test PAUSE #1'

LABEL .vlocal

{Value of vlocal at this point is 'JUMP1'}

Cheers,

Bruce


Reply via email to