Focal Point
[SOLVED] Problems with !IBI.FIL

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

June 04, 2019, 08:20 AM
ccollier
[SOLVED] Problems with !IBI.FIL
I have a stored procedure that outputs things in an array.

['Clean', new Date (2019,06,03,05,02,22,113), new Date (2019,06,03,06,29,24,397)],
['Extracts', new Date (2019,06,02,23,00,44,703), new Date (2019,06,03,05,02,10,883)],
['Stats Driver', new Date (2019,06,04,05,00,16,820), new Date (2019,06,03,07,16,50,450)],
['Transforms', new Date (2019,06,03,06,29,37,327), new Date (2019,06,03,08,11,14,200)]

I use ON TABLE HOLD to hold the table and then put it into javascript with !IBI.FIL. You would expect the output to be the same as what is shown above, but instead I get:
R
U
V
]
Y
W
Z
)
This output seems almost completely random.

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


WebFOCUS 8.2.01M on Windows 10
June 04, 2019, 08:27 AM
MartinY
How do you create your HOLD file ?

How do you expect to see the data ?
As one string per row ?
Different field based on comma ?

Have you took a look at the HOLD file output ? What is the result ?

Please use the code tag when providing sample result/code.
Last icon on the ribbon:
</>



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
June 04, 2019, 08:45 AM
ccollier
Creating my HOLD file I type
 TABLE FILE tablename
 BY data 
 ON TABLE HOLD AS holdname 
 END 


The data should be shown exactly as before.
 ['Clean', new Date (2019,06,03,05,02,22,113), new Date (2019,06,03,06,29,24,397)], 
['Extracts', new Date (2019,06,02,23,00,44,703), new Date (2019,06,03,05,02,10,883)], 
['Stats Driver', new Date (2019,06,04,05,00,16,820), new Date (2019,06,03,07,16,50,450)], 
['Transforms', new Date (2019,06,03,06,29,37,327), new Date (2019,06,03,08,11,14,200)] 


When checking the output of the hold file, it's exactly as it should be, but when looking at the !IBI.FIL output I get that random string.


WebFOCUS 8.2.01M on Windows 10
June 04, 2019, 10:15 AM
MartinY
So, as per your sample, you should have 4 rows and 1 field per row such as this ?
row 1 : ['Clean', new Date (2019,06,03,05,02,22,113), new Date (2019,06,03,06,29,24,397)]
row 2 : ['Extracts', new Date (2019,06,02,23,00,44,703), new Date (2019,06,03,05,02,10,883)]
row 3 : ['Stats Driver', new Date (2019,06,04,05,00,16,820), new Date (2019,06,03,07,16,50,450)]
row 4 : ['Transforms', new Date (2019,06,03,06,29,37,327), new Date (2019,06,03,08,11,14,200)]

I suspect that js is transforming/processing the brackets, quotes and/or coma other than just text string


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
June 04, 2019, 10:55 AM
Tom Flynn
TABLE FILE tablename
BY data
ON TABLE HOLD AS HOLD01 (ALL CAPS)
END
-RUN

Syntax for HOLD FILE in -HTMLFORM
!IBI.FIL.HOLD01;

hth...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
June 04, 2019, 02:10 PM
Hallway
quote:
Originally posted by ccollier:
Creating my HOLD file I type
 TABLE FILE tablename
 BY data 
 ON TABLE HOLD AS holdname 
 END 


The data should be shown exactly as before.
 ['Clean', new Date (2019,06,03,05,02,22,113), new Date (2019,06,03,06,29,24,397)], 
['Extracts', new Date (2019,06,02,23,00,44,703), new Date (2019,06,03,05,02,10,883)], 
['Stats Driver', new Date (2019,06,04,05,00,16,820), new Date (2019,06,03,07,16,50,450)], 
['Transforms', new Date (2019,06,03,06,29,37,327), new Date (2019,06,03,08,11,14,200)] 


When checking the output of the hold file, it's exactly as it should be, but when looking at the !IBI.FIL output I get that random string.


You need the name of the hold file included:

  
TABLE FILE tablename
 BY data 
 ON TABLE HOLD AS holdname 
 END 

-HTMLFORM BEGIN NOEVAL

!IBI.FIL.holdname;

-HTMLFORM END



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
June 04, 2019, 04:47 PM
CoolGuy
Phil is the best. #IBIdotFIL


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
June 04, 2019, 05:08 PM
Waz
A couple of things.

What is the format of the data field ?

When you do BY with no verb, be careful of what gets held, check the output, i.e. the hold master, to see what is in the hold file.

Is the field a variable length field ?

Perhaps use a SAVE instead of a HOLD.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

June 05, 2019, 08:45 AM
ccollier
After working with someone else, we fixed the problem.

DEFINE FILE DATA
VALUE/A300 = '' || VALUE
END

TABLE FILE DATA
PRINT VALUE
ON TABLE HOLD AS CHART FORMAT ALPHA
END 


Adding these extra lines of code and using !IBI.FIL.CHART seemed to fix the problems and output the data properly.


WebFOCUS 8.2.01M on Windows 10