Focal Point
Rewind Hold File ?

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

June 01, 2006, 06:19 PM
Govind Jujare
Rewind Hold File ?
I have a costly SQL query that I run and Hold. Then I run 'TABLE FILE SQLOUT'.
Is there a way to rewind the Hold file and reuse it with another 'TABLE FILE' ?
It says that the Hold file does not exist anymore.


WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
June 01, 2006, 06:41 PM
Nightowl
Could you supply a code snippet please of the SQL with the hold file code? Thanks.


Using: WF 7.1.5, XP Pro, Tomcat, Self Serve
June 01, 2006, 06:44 PM
Mikel
Storing first in your own hold file...

SQL DB2
  SELECT * FROM tablename ;
TABLE FILE SQLOUT
  PRINT *
  ON TABLE HOLD AS MYHOLD
END
-RUN

TABLE FILE MYHOLD
  PRINT *
END

Regards,
Mikel


WebFOCUS 8.1.05, 8.2.01
June 01, 2006, 06:47 PM
reFOCUSing
Are these other table files in the same fex file? If they are in the same file then yes.
SQL SQLORA
SELECT
...
;
TABLE
ON TABLE HOLD AS H0 FORMAT ALPHA
END
-RUN

TABLE FILE H0
HEADING
"REPORT 1"
PRINT *
ON TABLE PCHOLD FORMAT HTML
END
-RUN

TABLE FILE H0
"REPORT 2"
PRINT *
ON TABLE PCHOLD FORMAT HTML
END


If they are not in the same file, well I guess you can. You can tell WebFOCUS to create a flat file on edapath and then you can call that file in the other fex files. This is really not a good idea you should get a view created from your sql.
June 01, 2006, 06:47 PM
Nightowl
I don't use the SQLOUT method.
After the ; in the SQL statement, I do the following:
TABLE
ON TABLE HOLD AS MYFILE
END

Then you can do whatever you like with it. I wonder if that will help you?


Using: WF 7.1.5, XP Pro, Tomcat, Self Serve
June 01, 2006, 06:58 PM
Mikel
Nightowl:

Using only TABLE without FILE SQLOUT don't works everywhere (I have tried now WF7 with SQLMAC and i get a error message).

And attending doc. (for example Issuing Commands and Requests in DB2) we must use TABLE FILE SQLOUT.

Regards,
Mikel


WebFOCUS 8.1.05, 8.2.01
June 01, 2006, 11:37 PM
Govind Jujare
Thx for replies. SQLOUT didn't work. 'TABLE HOLD' worked. That
satisfied my need for rewinding the HOLD file.

SQL DB2
SELECT DISTINCT COL1
FROM TAB1;

TABLE ON TABLE HOLD AS H1
END

-* going
TABLE FILE H1
PRINT COL1
END

-* and going
TABLE FILE H1
PRINT COL1
END

-* and still going
TABLE FILE H1
PRINT COL1
END



WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
June 02, 2006, 02:58 AM
Mikel
This example also works:

SQL DB2 
SELECT DISTINCT COL1 FROM TAB ;
TABLE FILE SQLOUT 
PRINT * 
ON TABLE HOLD AS H1
END

Regards,
Mikel


WebFOCUS 8.1.05, 8.2.01