[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Parsing with XS



Instead of {<}SV01,{<}PV100{>}{>} , use SX01. SX means it will evaluate
whatever comes next. So it will interpret the value of SX100. You can
tighten the code by reading the VA$DA directly into SX01. You can also
bypass the XS completely by reading just part of the date into SX01, 03, 04,
05:

SX01,≪VA$DA yyyy-mm-dd≫ ≫

or

SX01, ≪VA$DA yyyy≫ ≫
SX04, ≪VA$DA mm≫ ≫
SX05, ≪VA$DA dd≫ ≫

A SV variable does no evaluation. It just blindly sticks whatever string of
characters you have given it into the variable. So ≪SV01,blah≫ contains
the value 'blah.' And ≪SV02,≪VA$PG≫ ≫ contains the value ≪VA$PG≫. And
≪SX03,≪VA$PG≫ ≫ contains a number corresponding to whatever page you are
on.

Chris


----- Original Message -----
From: "Patricia M Godfrey" 
To: 
Sent: Thursday, October 16, 2003 3:01 PM
Subject: Parsing with XS


> Is there any way to get something that has been defined as a variable and
> obtained by an XPL routine (rather than directly entered with
> ≪SV01,something≫) as the first term of a parse routine using XS? For
> example, if I run this bit of code:
>
> XPLeNCODE v2.0
> b-gin [UNTITLED]
> {<}SX100,{<}VA$DA yyyy-mm-dd{>}{>}{<}SV01,{<}PV100{>}{>}{<}SV
> 02,-{>}{<}XS01,02,03,04,05{>}[#8_]Results SG 01 IS {<}GT01{>}
> , SG 02 IS {<}GT02{>}, SG 03 IS {<}GT03{>}, SG 04 IS {<}GT04{
> >}, SG 05 IS {<}GT05{>}.
> -nd
> XPLeNCODE
>
> I get this in the file in Window 8:
> Results SG 01 IS ≪PV100≫, SG 02 IS -, SG 03 IS , SG 04 IS , SG 05 IS .
>
> But if I do this (i.e., hardcode the value of SV01):
> XPLeNCODE v2.0
> b-gin [UNTITLED]
> {<}SX100,{<}VA$DA yyyy-mm-dd{>}{>}{<}SV01,2003-10-16{>}{>}{<}
> SV02,-{>}{<}XS01,02,03,04,05{>}[#8_]Results SG 01 IS {<}GT01{
> >}, SG 02 IS {<}GT02{>}, SG 03 IS {<}GT03{>}, SG 04 IS {<}GT0
> 4{>}, SG 05 IS {<}GT05{>}.[cr|lf]
> -nd
> XPLeNCODE
> I get this in the file in Window 8:
> Results SG 01 IS 2003-10-16, SG 02 IS -, SG 03 IS 2003, SG 04 IS -, SG 05
> IS 10-16.
>
> Which is what I want. I did look at Robet's discussion of this in
> CtrlChars, but could not find where it expressly addressed this.
> Wildcards, yes, but not passing variables.
> TIA
> Patricia
>
>