-SET &CTRY = 'ITALY';
DEFINE FILE CAR
COUNTRYSORT/A11 = IF COUNTRY EQ '&CTRY' THEN '1' | COUNTRY ELSE '2' | COUNTRY;
END
TABLE FILE CAR
PRINT
CAR
BY COUNTRYSORT NOPRINT
BY COUNTRY
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 08, 2009, 03:43 PM
Waz
As this is user input, I would also have matched the case of the test.
-SET &CTRY = UPCASE(&CTRY.LENGTH,&CTRY,'A&CTRY.LENGTH');
COUNTRYSORT/I1 = IF UPCASE(10,COUNTRY,'A10') EQ '&CTRY' THEN 1 ELSE 2 ;
-SET &CTRY = 'itAly';
-SET &CTRY = UPCASE(&CTRY.LENGTH, &CTRY, 'A&CTRY.LENGTH');
DEFINE FILE CAR
COUNTRYSORT/A1 = IF COUNTRY EQ '&CTRY' THEN '1' ELSE '2';
END
TABLE FILE CAR
PRINT
CAR
BY COUNTRYSORT NOPRINT
BY COUNTRY
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server