Focal Point
[SOLVED] CHECK FILE HOLD ... field called KIND

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2517015506

June 15, 2011, 12:19 PM
twiddows55
[SOLVED] CHECK FILE HOLD ... field called KIND
It would appear that the field called KIND in a check file hold ouput file has a format of U4 (U4B) .... I THINK this field is used to denote the type of field. EG DEFINEd field is 07000000 and DEFINEd field with MISING ON is 07080000. Trouble is I cannot seem to reference this field in an IF/DEFINE to flag DEFINEd fields. anyone know a way round this ? Any hints/tips would be appreciated !

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6, Windows, unix
June 15, 2011, 12:36 PM
<JG>
twiddows55,

Found this on the internal site, might help depending on what you actually are trying to do.

DEFINE FILE SYSCOLUM
DEF_TYPE/A15 = DECODE DEFINE('C' 'Computes' 'F' 'Filters' 'Y' 'Defines'
ELSE 'Fields ');
END
TABLE FILE SYSCOLUM
PRINT NAME AS '' ALIAS AS '' USAGE AS ''
WHERE TBNAME EQ 'EMPLOYEE'
BY DEF_TYPE ROWS
Fields OVER
Defines OVER
Computes OVER
Filters
END
June 15, 2011, 01:19 PM
twiddows55
Thanks very much I can work around this now!
There is a field called DEFINE and DEFTEXT in the table which gives me a flag creator and something to work with. If anyone out there does know anything about the 'KIND' field I would still appreciate the knowledge on how to read it but this will enable me to achieve what I need to do. TVM


WebFOCUS 7.6, Windows, unix
June 15, 2011, 01:21 PM
Alan B
Twiddows

U format is unformatted hexadecimal. So if your field looks like 07080000, for screening you can use:
DEFINE FILE HOLD
IG /A1 = HEXBYT(7, 'A1');
UG /A1 = HEXBYT(8, 'A1');
AH/A1 = IF KIND CONTAINS IG THEN 'Y' ELSE 'N';
AY/A1 = IF KIND CONTAINS UG THEN 'Y' ELSE 'N';
END
TABLE FILE HOLD
PRINT KIND IG UG AH AY
-*WHERE KIND CONTAINS IG 
-*   OR KIND CONTAINS UG
END


To see exactly what happens, try
DEFINE FILE HOLD
NEWKIND/U8 = KIND;
END
TABLE FILE HOLD
PRINT KIND  NEWKIND
IF NEWKIND CONTAINS ' ' 
END
TABLE FILE HOLD
PRINT KIND  NEWKIND
IF NEWKIND OMITS ' ' 
END



Alan.
WF 7.705/8.007
June 16, 2011, 02:16 AM
Alan B
As an aside, you can change the format of a field to be Unn to get hex output. Change COUNTRY to U10 and you get:
COUNTRY 
454E474C414E44202020 
4A4150414E2020202020 
4954414C592020202020 
57204745524D414E5920 
4652414E434520202020 

This can be useful to elicit weird characters in data.


Alan.
WF 7.705/8.007
June 16, 2011, 04:16 AM
Tony A
Alan,

Thanks very much for that snippet of info, it will be very useful!!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 16, 2011, 04:52 AM
twiddows55
Alan/JG,
Thanks very much for all your help, much appreciated.
Rgds
Tony


WebFOCUS 7.6, Windows, unix
June 17, 2011, 02:17 AM
Rajna Nannat
Information on how to read the KIND field so that we can apply filter for it was really good.

Can anyone suggest what information this field holds , do we get any information regarding the primary key of a table.

If not please post any suggestions from which we can get the primary key of a table from a Hold table structure.


WebFOCUS 8.1.05
Windows
Excel, PDF, HTML