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

Re: Carl's notes



Carl,
There seems to be a problem using your VA@ in a loop, when each loop gets a new value for the original S/G (to be parsed). It kind of loses its place--gets the field number (or comma number) wrong.
Attached HB.TST is a snippet of the code I'm having problems with. I am
also attaching a small file it needs: DATA.
Also, if you know some more elegant way to do the IF testing I'm doing at
the bottom of the code, I'd appreciate knowing it.

I am aware that the way I find the name of the person is clumsy:
 XD PP NP DF NP CL DF

should probably be:
XD DP DM CL DF

but I thought it best to leave it for now.

Thanks,
Harry
Reply to note from Carl Distefano  Sun, 31 Aug 2008
13:18:39 -0400

Double whoops! Sorry, another fault.

Use THIS one, please (I believe it's bulletproof now), not any of
the earlier versions.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5VA@*}} "VAnn@,x"-style parsing operator (e.g., [JM_]2.VA@
01,35[Q2_]) overcomes 77-byte limit of native VA@nn [S/G 50 o
ut] CLD rev.8/31/08-a[cr|lf]{002}{<}SX51,{<}VA$FR{>}{>}{<}SX
51,{<}VA@51@02{>}{>}{<}SV52,{027}S{>}{<}XS51,52,52,53,54{>}{<
}SX50,"{<}IF{<}VA|"+{<}IS52{>}+"{>}<0{>}{<}SV"+{<}IS52{>}+",{
{062}}{<}EI{>}{<}SX51,{<}IS"+{<}IS52{>}+"{>}{>}"{>}{<}PV50{>}{<}S
V52,{>}{<}SX55,0{>}{<}CUb,54{>}{<}SX55,{<}PV55{>}+1{>}{<}XS51
,53,50,,52{>}{<}IF({<}PV55{>}=={<}PV54{>}-1&{<}IS53{>}{238}{<
}IS52{>}<0)!({<}PV55{>}>{<}PV54{>}&{<}VA|52{>}<1){>}{<}SX50,{
<}IS52{>}{>}{<}LBa{>}{<}SV51,{>}{<}SV52,{>}{<}SV53,{>}{<}SV54
,{>}{<}SV55,{>}{<}EX{>}{<}EI{>}{<}SX51,{<}IS52{>}{>}{<}SV52,{
{062}}{<}LBb{>}{<}GLa{>}{002}[cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx
8-8-08,Michael Christopher,14,2008-7,2008-8,paypal
8-8-08,James Smith,145,2008-8,2009-8,paypal
8-8-08,Barry Batman,145,2008-7,2009-7,paypal
8-8-08,Damon Cole,14,2008-7,2008-8,paypal
8-8-08,Erik Kloppers,145,2008-7,2009-7,paypal
8-8-08,Jay McGee,14,2008-7,2008-8,paypal
8-6-08,Tony Black,14,2008-7,2008-8,paypal
8-6-08,Paul Gruchala,145,2008-8,2009-8,check
8-6-08,William Dunn,14,2008-7,2008-8,check
8-6-08,James Smith,14,2008-7,2008-8,cash
8-6-08,John Williams,145,2008-7,2009-7,check
XPLeNCODE v2.0
b-gin [UNTITLED]
{<}SV04,{>}{<}SV06,{>};*;[cr|lf]{<}SV12,PAYPAL{>}{<}SV13,CASH
{>}{<}SV14,CHECK{>}{<}SV15,TIGER{>};*;[cr|lf][BX_]ca data[Q2_
];*;[cr|lf]{<}LBD{>};*; AUDIT.LOOP [cr|lf][BX_]gofile data[Q2
_]{<}SX18,{<}IS04{>}{>}{<}SX19,{<}IS04{>}{>}{<}SX20,{<}IS04{>
}{>}{<}SX21,{<}IS04{>}{>}{<}SX22,{<}IS04{>}{>}{<}SX23,{<}IS04
{>}{>};*;[cr|lf][BX_]se /{<}PV16{>},/[Q2_];*;[cr|lf]{<}IF{<}E
R{>}{>}{<}ex{>}{<}EI{>};*;[cr|lf][XD_][PP_][NP_][DF_][NP_][CL
_][DF_]{<}SV01{>}[XD_][JM_]2.VA@01,1[Q2_]{<}SX18,{<}IS50{>}{>
}[JM_]2.VA@01,3[Q2_]{<}SX19,{<}IS50{>}{>}[JM_]2.VA@01,4[Q2_]{
<}SX20,{<}IS50{>}{>}[JM_]2.VA@01,5[Q2_]{<}SX21,{<}IS50{>}{>}[
JM_]2.VA@01,6[Q2_]{<}SX22,{<}IS50{>}{>}[BC_]{<}PV18{>}|{<}PV1
9{>}|{<}PV20{>}|{<}PV21{>};*;[cr|lf]{<}IF{<}RC{>}=="x"{>}{<}e
x{>}{<}EI{>};*;[cr|lf][BC_]>{<}PV22{>};*;[cr|lf]{<}IF{<}RC{>}
=="x"{>}{<}ex{>}{<}EI{>};*;[cr|lf]{<}SX24,{<}IS22{>}{>}{<}SX2
2,@UPR({<}IS22{>}){>}{<}SX25,0{>};*;[cr|lf]{<}IF{<}IS12{>}{23
8}{<}IS22{>}>=0{>}{<}SV22,paypal{>}{<}SX25,1{>}{<}EI{>};*;[cr
|lf];*;[cr|lf]{<}IF{<}IS15{>}{238}{<}IS22{>}>=0{>}{<}SV22,cre
ditcard{>}{<}SX25,1{>}{<}EI{>};*;[cr|lf];*;[cr|lf]{<}IF{<}IS1
3{>}{238}{<}IS22{>}>=0{>}{<}SV22,cash{>}{<}SX25,1{>}{<}EI{>};
*;[cr|lf];*;[cr|lf]{<}IF{<}IS14{>}{238}{<}IS22{>}>=0{>}{<}SV2
2,check{>}{<}SX25,1{>}{<}EI{>};*;[cr|lf];*;[cr|lf]{<}IF{<}PV2
5{>}==0{>}{<}SX23,{<}IS24{>}{>}{<}SX22,{<}IS04{>}{>}{<}EI{>};
*;[cr|lf]{<}GLD{>}
-nd
XPLeNCODE

Harry Binswanger
hb@xxxxxxxx