Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 27 APR 2022 06:37:30PM Matthew Crozier wrote:

In OI9 we use the legacy OR_View() and OR_Prtf() functions to generate audit and process dumps, which can be in the 10s of megabytes. These are fairly simple but the do the job. It appears that OI10 doesn't support these tools? It looks like there was some effort to use OIPI.Net as the report generator, but they don't work so perhaps this was abandoned.

Anyway, I'm refactoring to use Run_Report() instead. But it appears that there is some practical limit on size of report that can be generated. For a large report ( ~33Mb when captured as a TXTFILE), the preview window just shows a single blank page. (Same thing in OI9, except this shows the report heading).

Capturing as a PDFFILE fails with this error below. Maybe this is related.

The report also takes 3x more time to produce than OR_View(). It seems to be producing many OIPI_guiId.CSV files in the Windows Temp folder, each new one being inclusive of the previous, consuming a huge amount of diskspace

 Directory of C:\Users\Matt\AppData\Local\Temp

27/04/2022  12:50 pm    <DIR>          ..

27/04/2022  12:50 pm                 0 OIPI_62AF034AAB402140BC0F0CAF127873F9.CSV

27/04/2022  12:50 pm    <DIR>          .

27/04/2022  12:50 pm        26,820,608 OIPI_E573252CF7A68F4EBBAB142320AECD33.CSV

27/04/2022  12:50 pm        26,783,744 OIPI_583AC07D5908574390B7B5D3B7F08D8B.CSV

27/04/2022  12:50 pm        26,746,880 OIPI_3D998FA069317041A61572804E81B29F.CSV

27/04/2022  12:50 pm        26,705,920 OIPI_12A878B576F2984A93A86B7CBCC270DE.CSV

27/04/2022  12:50 pm        26,669,056 OIPI_AA390593632506478647B422A32F8CAC.CSV

27/04/2022  12:50 pm        26,632,192 OIPI_C5D640E427774742952B653489EACD7A.CSV

27/04/2022  12:50 pm        26,595,328 OIPI_E81658E291913644858969A6CC6DBFB8.CSV

27/04/2022  12:50 pm        26,558,464 OIPI_70F3B8BE4983B34CA45E2EDA1B4D6EE7.CSV

27/04/2022  12:50 pm        26,517,504 OIPI_9ED4DA2FD0F2994CABF9924D0A9B8A45.CSV

27/04/2022  12:49 pm        26,480,640 OIPI_DBD2E5B443B79349B54CAD95776DC1FA.CSV

27/04/2022  12:49 pm        26,443,776 OIPI_D37A9EAC43450D4EA73856ED605ACB04.CSV

27/04/2022  12:49 pm        26,406,912 OIPI_9A94490A131FC4488064E3246A3E2D56.CSV

...

Should this really just be updating the one temp file?

Cheers, M@

Vernon Systems


At 28 APR 2022 09:50AM bob carten wrote:

OR_VIEW ???

I thought I was the only one still using that.

I have experimented with different options in 10. My goal is to make it give a simple fast report to screen.

For 10.2 I was planning on making OR_VIEW report to a grid, same as the (G option in TCL I am fixing up the grid so that you can save from there.

The multiple CSV files is a bug. Will check

In the meantime, you shld be able to use a snippet like below to generate a CSV file from an rlist statement.


Function example_list_to_file(statements, filename, format)

/*



   * Usage

   * statements = stack of rlist commands ending with a LIST

   * filename = path and name f the export file, this proc will append the extension if missing

   * format (optional) defaults to CSV

   

   * Example

   cmd = 'LIST PERSON LNAME FNAME CITY'

   fname = 'c:\temp\test.csv'

   call example_list_to_file(cmd, fname)

*/



     declare Function ucase



     $Insert rlist_equates



     If Assigned(statements) Else statements = ""

     If Assigned(filename) Else filename = ""



     * Validate the format

     outFmt = If Assigned(format) Then format Else ""

     Convert @lower.Case To @upper.Case In outFmt

     debug

     Locate outFmt In "CSV TXT HTML JSON XML" using " " setting unused Else

          outFmt = "CSV"

     End

     



     output = ""

     If statements ! = "" And filename != "" Then

     

          * Add the extension

          If filename[-1, 'B.'] != outFmt Then

             filename := ".":outFmt

          End

          

          * Generate the data

          call Rlist(statements, target_variable$, output, outfmt)

          

          * save it

          OSWrite output On filename

          

     End



Return ""


At 28 APR 2022 05:05PM Matthew Crozier wrote:

OR_VIEW ???

My goal is to make it give a simple fast report to screen.

For 10.2 I was planning on making OR_VIEW report to a grid, same as the (G option in TCL I am fixing up the grid so that you can save from there.

In the meantime, you shld be able to use a snippet like below to generate a CSV file from an rlist statement.

Hi Bob,

Yes, OR_View is great as a quick no-frills navigable report viewer. I suspect OIPI has some practical limitations for output size.

Thanks the for code snippet for a direct dump to file. I'd be tempted to use a callback function for constructing large output files using osBwrite - or is that technique not really required any more in a 64bit environment?

Cheers, M@

Vernon Systems


At 29 APR 2022 09:01AM bob carten wrote:

I'd be tempted to use a callback function for constructing large output files using osBwrite - or is that technique not really required any more in a 64bit environment?

As in OI9, if the list size exceeds the maximum variable size then you have to osbwrite it in chunks.

In oi10.1 the max variable size is makse2GB, so I got in habit of always buffering the full output rather than writing it in chunks. It makes for faster, simpler code, assuming less than 2GB output.

Coincidentally, a customer testing indexing with 65 million row tables found the 2GB variable size was inadequate to buffer the indexes. In 10.2 the max variable size will be a petabyte.


At 21 AUG 2023 10:05PM Matthew Crozier wrote:

For 10.2 I was planning on making OR_VIEW report to a grid, same as the (G option in TCL I am fixing up the grid so that you can save from there.

Hi Bob,

I see in 10.2.1-b3 you're working on using the Report Grid for OR_View reports:

i.postimg.cc_cm8rjggv_or-view-grid.jpg

Nice! I know it's still work in progress. One thing I notice is that the progress bar keeps cycling through the 'Reporting' stage.

Just looking at where this is heading -

Is this viewer going to be paginated somehow? Will it cope with very large reports, like OR_View v9 did?

Our tool will need a viewer that can cope with a huge range of result sets. Would it be possible to include OR_View v9 in OI 10?? Perhaps as a separate program OR_View_V9(), or a SYSENV CFG record?

Cheers, M@

Vernon Systems

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/ea33f740198d2c4d92ce013d883c0a94.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1