Focal Point
[Solved]-Field existence with Table file request

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

July 08, 2009, 04:52 AM
atturhari
[Solved]-Field existence with Table file request
Hi,

Is there any way to check for the column existence within table file request.

For example, within the table file request,
if a certain field exists then display some values or else display as blank.

Thanks
Hari

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


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
July 08, 2009, 05:15 AM
ac1
Hi,
do you want to check if this field has a value or if this field exists (in other words, if the name of the field is in the Master)?

In the first case you can use IS MISSING (when MIISSING is a possible value) or you can use FIELD EQ ''.
In the second case, I don't know. But if you have Master file, you should already know if the name of the field exists.

bye

P.S.: did you post this thread some days ago?



FOCUS 7.2.0S1
Mainframe - MVS 390
Excel, Flat file

Italy
July 08, 2009, 05:25 AM
atturhari
Yes, you are right.
but in my case, i want to find if a field exists in a hold which gets dynamic data.

So, in my compute statement, if a field exists then i want to display its values else just show as blank.

I did not post this earlier. I looked at other threads but couldn;t get any answer.

-Hari


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
July 08, 2009, 06:02 AM
ac1
Dynamic data....
May be in a ACROSS statement.
In this example you don't know the possible values of FIELD1 and so you don't know how may fields has file X2 and the names.
Is it your case?

TABLE FILE X1
SUM TOTAL1  AS ''             
BY KEY              
ACROSS FIELD1
ON TABLE HOLD AS 'X2'     
END                             




FOCUS 7.2.0S1
Mainframe - MVS 390
Excel, Flat file

Italy
July 08, 2009, 06:17 AM
atturhari
Yes absolutely.

By default, i want some 10 columns to be displayed in my request.
So, if the across field has got only 5 values then i want only the 5 columns to be displayed with Across field value and others as blank.

Also, in my case, i want to position the coulmn according to the across field value.
if the across field value is CAR8, then i want CAR8 values to be displayed in 8th column. If it is CAR3 then in 3rd column.

I tried something as follows,
COMPUTE P1/A20 = HoldField1;
COMPUTE P2/A20 = HoldField2;

It fails when there is no value for across field or no filed in the hold file.


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
July 08, 2009, 06:30 AM
ac1
Have you already tried to create a file guide and then match (or join) with across file?
In this way all the fields of across file will be display.
I don't know other ways

MATCH FILE Z1
PRINT *
BY KEY
RUN                      
FILE X2
SUM   *                  
BY KEY NOPRINT
AFTER MATCH HOLD AS 'Z2' OLD 
END




FOCUS 7.2.0S1
Mainframe - MVS 390
Excel, Flat file

Italy
July 08, 2009, 07:13 AM
ac1
Try to see this:

http://forums.informationbuild...71057331/m/495103261



FOCUS 7.2.0S1
Mainframe - MVS 390
Excel, Flat file

Italy
July 08, 2009, 08:04 AM
atturhari
yes..in the above thread, we can only check the field existence outside the table file request..i want it to be checked within table file request


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
July 08, 2009, 08:21 AM
Tony A
Use COLUMN syntax -

ACROSS field_name
COLUMNS 'CAR1' AND 'CAR2' AND 'CAR3' etc.

The advantage of doing this is that if CAR6 never appears in the data it will still appear in your report.

This has been covered many times in previous posts but you have to be non-restrictive in your search and try several different key words with similar meaning.

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