In fact, there is no reason to limit the usage to SPECS:

        "... | pick w3 == var Fred | ... "
        "... | strnfind var Fred | ..."
        "... | insert var Fred | ..."

For extra fun:

        "... | specs ... substr w3 of var Fred nf ... | ... " /* Write
third word of Fred as next field. */
And 
        "... | locate 41.80 substr 10.3 of var Fred | ..."  /* Look for
chars in 10-12 of Fred in pos 41-120 of record */

Thinking about 'TRACKING' gives me a headache, but it could be useful in
some situations, and confusing in others.  Could the keyword 'TRACKING'
be used to control it...?

-----Original Message-----
From: CMSTSO Pipelines Discussion List
[mailto:[email protected]] On Behalf Of SPITZ, HOBART CTR DFAS
Sent: Tuesday, May 19, 2009 4:48 PM
To: [email protected]
Subject: Re: [CMS-PIPELINES] Suggestion: New keyword in SPECS

It would be the same as the second case (x"c2x(Fred)"), less
conversions.  The value of the Fred would be at the value stored in the
output buffer at the specified location.  Blanks would be honored, since
the parser would not look at the data anymore than it looks at the data
in 1-*.  

-----Original Message-----
From: CMSTSO Pipelines Discussion List
[mailto:[email protected]] On Behalf Of Rich Greenberg
Sent: Tuesday, May 19, 2009 4:40 PM
To: [email protected]
Subject: Re: [CMS-PIPELINES] Suggestion: New keyword in SPECS

On: Tue, May 19, 2009 at 02:47:25PM -0400,SPITZ, HOBART CTR DFAS Wrote:

} The following assumes that \ can never occur in the data stored in
} variable Fred.
}
}       "pipe .... | specs \"Fred"\ 1 ... | ..."
}
} The canonical way to handle data in a REXX variable in a delimiter
} independent manner is:
}
}       "pipe .... | specs x"c2x(Fred)" 1 ... | ..."

[...]

} I propose the following equivalent:
}
}       "pipe .... | specs var Fred 1 ... | ..."
}
} That, in turn, suggests the following:
}
}       "pipe .... | specs 1-10 var Fred ... | ...",
}
} which would store the first ten chars of the record in the variable
} Fred.

Hobart, What happens here if "fred" contains one or more imbedded
blanks?

--
Rich Greenberg  N Ft Myers, FL, USA richgr atsign panix.com  + 1 239 543
1353
Eastern time.  N6LRT  I speak for myself & my dogs only.    VM'er since
CP-67
Canines:Val, Red, Shasta & Casey (RIP), Red & Zero, Siberians
Owner:Chinook-L
Retired at the beach                                     Asst
Owner:Sibernet-L

Reply via email to