Diagnostic level set follows, this occurs at both levels:
---<snip>---
piplevel
PIPINX560I CMS/TSO Pipelines, 5654-030/5655-A17 level 110C0002.
PIPINX086I CMS/TSO Pipelines, 5654-030/5655-A17 1.0112
(Version.Release/Mod) -
Generated 11 Mar 2010 at 10:24:55
Source: Princeton Runtime Distribution

piplevel
PIPINX560I CMS/TSO Pipelines, 5654-030/5655-A17 level 110B001E.
PIPINX086I CMS/TSO Pipelines, 5654-030/5655-A17 1.0111
(Version.Release/Mod) -
Generated 16 Dec 2008 at 15:38:27
Source: Princeton Runtime Distribution
---<snip>---

I am receiving the following messages running a local REXX stage to break
devices addresse ranges down into groups of 256 (which works with VARY ON
and VARY OFF):

PIPMSG004I ... Issued from stage 7 of pipeline 1 name "HexRanges".
PIPMSG001I ... Running "SPECS 1.6 X2D 1".
PIPDSP537I Commit level 0.
PIPMSG004I ... Issued from stage 7 of pipeline 1 name "HexRanges".
PIPMSG001I ... Running "SPECS 1.6 X2D 1".
PIPDSQ028I Starting stage with save area at X'7F26F7F0 7F2637F0 00000000'
on com
mit level -2.
PIPMSG004I ... Issued from stage 9 of pipeline 1 name "HexRanges".
PIPMSG001I ... Running "SPECS a: 1-* . IF a-#1=1 THEN NOPRINT SET #1:=a
NO".
PIPSPX1086E Improper operand for string expression.
PIPMSG004I ... Issued from stage 9 of pipeline 1 name "HexRanges".
PIPMSG001I ... Running "SPECS a: 1-* . IF a-#1=1 THEN NOPRINT SET #1:=a
NO".
PIPSPE192I ... Scan at position 71; previous data "SET #1:=a NOPRINT SET
#9+=1 I
F #9==256".
PIPDSP020I Stage returned with return code 1086.
PIPMSG004I ... Issued from stage 9 of pipeline 1 name "HexRanges".
PIPMSG001I ... Running "SPECS a: 1-* . IF a-#1=1 THEN NOPRINT SET #1:=a
NO".
PIPDSQ028I Starting stage with save area at X'7F26F970 7F264C88 00000000'
on com
mit level -2.
PIPMSG004I ... Issued from stage 10 of pipeline 1 name "HexRanges".
PIPMSG001I ... Running "DROP 2".
PIPDSP538I Query state of INPUT stream 1.

An earlier version of this REXX stage has no problems with:
---<snip>---
'| SPECS a: 1-* .' ,                  /* Set "a:" to number   */
   , /* Ctr #0 used as 1st num in range, Ctr #1 as prev num   */
'IF a-#1=1' ,                    /* Next num in range?   */
   'THEN NOWRITE SET #1:=a' ,      /* Y, set Ctr #1 to a */
   'ELSE PRINT #0 D2X 1.4 RIGHT' , /* N, prt 1st rngnum  */
---<snip>---

The updated stage to cut off the address ranges at every 256 interval, the
one receiving those messages is pasted below my signature.

Why does one 'SET' parse correctly while the other does not?

BTW, this is the first time I've really attempted to put SPEC's
IF/ELSE/ENDIF's to significant use - this could be just a personal
learning curve issue.
A few more examples of multiple "item group" usages within that part of
the SPEC Reference would be useful to the innocent.


Mike Walter
Hewitt Associates
The opinions expressed herein are mine alone, not my employer's.

/* Prolog; See Epilog for additional information ********************
 * Exec Name     - HEXRANGE EXEC                                    *
 * Unit Support  - OSSD/VM                                          *
 * Status        - Version 1, Release 1.0                           *
 ********************************************************************/

/* address 'COMMAND' */
   parse source xos xct xfn xft xfm xcmd xenvir .
   parse upper arg parms 1 operands '(' options ')' parmrest

   hi='1DE8'x                               /* 3270 Hilite Char     */
   lo='1D60'x                               /* 3270 Default Char    */
   Signal ON Syntax
   Signal ON NoValue
/* Signal ON ERROR */
   If parms='?' then Signal Explain

   If parms<>''
      then inputrange='| SPECS' parms '1'
      else inputrange=''


      'CALLPIPE (LISTERR NAME HexRanges)' ,
      '  *:' ,
         inputrange ,                       /* Limit to input range?*/
      '| XLATE *-* A-F FA-FF FA-FF A-F' ,   /* Prepare to hex-sort  */
      '| SORT' ,                               /* Sort in hex order */
      '| XLATE *-* A-F FA-FF FA-FF A-F' ,   /* Restore from hex     */
      '| INSERT /00/ BEFORE' ,              /* Set to length of 6   */
      '| SPECS 1.6 X2D 1' ,                 /* Convert to decimal   */
      '| LITERAL -2' ,                      /* Append a rngstopper  */
      '| SPECS a: 1-* .' ,                  /* Set "a:" to number   */
         , /* Ctr #0 used as 1st num in range, Ctr #1 as prev num   */
           'IF a-#1=1 THEN' ,               /* Next num in range?   */
              'NOPRINT SET #1:=a' ,         /* Y, set Ctr #1 to a   */
              'NOPRINT SET #9+=1' ,         /*    Incr range cnt    */
              'IF #9==256 THEN' ,
                 '/-/ 5 PRINT #1 D2X 6.4 RIGHT' , /* Force rng end  */
                 'NOPRINT SET #9:=1' ,      /* Fresh range cnt      */
              'ENDIF' ,
           'ELSEIF a-#1<>1 THEN' ,          /* Next num in range    */
              'PRINT #0 D2X 1.4 RIGHT' ,    /* Print 1st rngnum     */
              'NOPRINT SET #9:=1' ,         /* Fresh range counter  */
           'ENDIF' ,
           ,
           'IF #1>#0 THEN' ,                /* New range?           */
              '/-/ 5 PRINT #1 D2X 6.4 RIGHT' , /* Y, finish range   */
           'ENDIF' ,
           ,
           'SET #1:=#0:=a' ,                /* Both Ctrs to value a */
           'ENDIF' ,
        'EOF' ,                             /* Close out final rng  */
        'PRINT #0 D2X 1.4 RIGHT' ,          /* Prt 1st rec in rng   */
        'IF #1>#0' ,                        /* Rngstopper (-2)?     */
           'THEN /-/ 5 PRINT #1 D2X 6.4 RIGHT' , /* Y, close        */
        'ENDIF' ,
      '| DROP 2' ,
      '| *:'
Call Exit rc*(rc<>12)

/********************************************************************/
/*                   Sub-Routines below this point                  */
/********************************************************************/

Exit:
   parse arg exitrc .
   If verify(exitrc,'-0123456789')=0 then Exit exitrc
                                     else Exit 999999

Error:
   say '+++ "ERROR" error routine entered in:' xfn xft xfm', rc='rc
   say '+++ from line:' sigl', which reads:'
   say '+++'sourceline(sigl)
Call Exit 20


Syntax:
   say '+++ "SYNTAX" error routine entered in:' xfn xft xfm', rc='rc
   say '+++ from line:' sigl', which reads:'
   say '+++'sourceline(sigl)
Call Exit 20


NoValue:
   say '+++ "NoValue" error routine entered in:' xfn xft xfm', rc='rc
   say '+++ from line:' sigl', which reads:'
   say '+++'sourceline(sigl)
   say '+++ Variable with no value is:' condition('Description')
Call Exit 24


Explain:
  'PIPE (NAME Explain)' ,
     '| <' xfn xft xfm ,
     '| INSIDE /ExplainBegin:/ /ExplainEnd:/' ,
     '| PREFACE STRLITERAL /'xfn xft xfm 'help.../' ,
     '| CONSOLE'
   Call Exit 0
/*
ExplainBegin:

HEXRANGE REXX is used to read a string of records containing hex device
addressess, and produce hex device address ranges.

             +- 1-* ------+                                             <
>>-HEXRANGE--+------------+--------------------------------------------><
             +-inputrange-+                                             <


For example, input records:

0001
0002
0180
0181
0182
0183

Processed by the command: PIPE < fid | rexx hexrange | cons
results in output records:
0001-0002
0180-0183

---

Another example with input records:
DASD 0900 CP SYSTEM xxxxxx   0     SHARED
DASD 2000 OFFLINE
DASD 2001 OFFLINE
DASD 3048 CP OWNED  xxxxxx   200   SHARED
DASD 3049 CP OWNED  xxxxxx   57    SHARED
DASD 5000 OFFLINE
DASD 6C00 CP SYSTEM DEVNO    3     SHARED
DASD 6C01 CP SYSTEM xxxxxx   3
DASD 6C03 CP SYSTEM xxxxxx   0

Processed by the command: PIPE < fid | rexx hexrange w2 | cons

results in output records:
0900
2000-2001
3048-3049
5000
6A00-6A01
6C00-6C03

ExplainEnd:
*/

/* Epilog ***********************************************************
 * Date Written  - 20060522                                         *
 * Author        - Michael R. Walter                                *
 *                 based wholly on an CMSPIPELINES listserve        *
 *                 contribution on 20060518 by Glenn Knickerbocker. *
 *                                                                  *
 * Changed | By  | Description of Change                            *
 * --------+-----+------------------------------------------------- *
 * 20100304  mrw - Add 'inputrange' support.                        *
 *                                                                  *
 ********************************************************************/


The information contained in this e-mail and any accompanying documents may 
contain information that is confidential or otherwise protected from 
disclosure. If you are not the intended recipient of this message, or if this 
message has been addressed to you in error, please immediately alert the sender 
by reply e-mail and then delete this message, including any attachments. Any 
dissemination, distribution or other use of the contents of this message by 
anyone other than the intended recipient is strictly prohibited. All messages 
sent to and from this e-mail address may be monitored as permitted by 
applicable law and regulations to ensure compliance with our internal policies 
and to protect our business. E-mails are not secure and cannot be guaranteed to 
be error free as they can be intercepted, amended, lost or destroyed, or 
contain viruses. You are deemed to have accepted these risks if you communicate 
with us by e-mail.

Reply via email to