I agree, default edit codes or words would be nice. However they are very
limited as to where they are used. For example, let's take this DDS file:
NBRFLD 9P 0 EDTWRD(' - - ')
If I compile that and punch in two records and then run RUNQRY
QRYFILE(LUC) I get:
All well and good. However if I pull that into Excel I get
Then I adjust my column width and I get:
Where's my editing? How would that appear on a web screen (by "default")?
Let's try this instead. If run this wee bit of sql:
CREATE TABLE ROB/LUC2
CREATE FUNCTION ROB/SSN(INPUT DEC(9,0))
RETURNS NULL ON NULL INPUT
DECLARE CHARNBR CHAR(9);
DECLARE SSN CHAR(11);
SET CHARNBR = CHAR(INPUT);
SET SSN = SUBSTR(CHARNBR,1,3) CONCAT '-' CONCAT
SUBSTR(CHARNBR,4,2) CONCAT '-' CONCAT
CREATE VIEW ROB/LUC2VIEW AS (
SELECT NBRFLD, SSN(NBRFLD) AS SSNFMT
and then I run this:
select * from rob/luc2view
Now, when I pull this down into Excel the column SSNFMT looks like:
And there's nothing that says that different regions cannot have their own
version of the SSN function.
The SSN function itself could have logic in it to reformat based on
As an Amazon Associate we earn from qualifying purchases.
This thread ...
RE: PF Compiled Files with Dictionaries vs. SQL-Created Tables, (continued)
This mailing list archive is Copyright 1997-2021 by
midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.