Focal Point
[CLOSED] SQL PassThru to FORMAT FOCUS?

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

March 12, 2013, 06:43 PM
Doug
[CLOSED] SQL PassThru to FORMAT FOCUS?
Still not there yet... but, I closed it anyway... Frowner

How do I HOLD to a FORMAT FOCUS file directly from a SQL PassThru? I don't want to do a
TABLE FILE SQLOUT 
PRINT FIELDS...
ON TABLE HOLD AS MYDATE FORMAT FOCUS
END
as an intermediary step.

What I'm trying to recollect is the way to use SQL PassThru to hold the data and use my preexisting synonym.

Thanks in advance for thawing out this brain freeze. Doug ( This is me trying to thaw out Sweating )

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
March 12, 2013, 06:56 PM
Waz
I don't believe that you can.

Why to you need a FOCUS db ?
Is there a large number of records ?


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!

March 12, 2013, 06:58 PM
Doug
What I'm trying to recollect is the way to use SQL PassThru to hold the data and use my preexisting synonym.

I was going to use the DATA from the SQL PassThru and MY MFD via the "USE" command.
March 12, 2013, 07:22 PM
Waz
I think you will have to use:
SQL
.
.
.
;
TABLE FILE SQLOUT
.
.
.
ON TABLE HOLD AS ? FORMAT ?
END


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!

March 12, 2013, 09:13 PM
Doug
Thanks Waz,

I may need to go that way, but can't try it right now (no machine with the stuff I need for that)... I know that this works:
SELECT * FROM TABLENAME;
TABLE ON TABLE HOLD AS MY_DATA FORMAT ALPHA 
END
-RUN
is possible. How about this:
SELECT * FROM TABLENAME;
TABLE ON TABLE HOLD AS MY_DATA FORMAT FOCUS 
END
-RUN
... using a predefined MFD? I'll check this out in the morning (USA Central Time).

This message has been edited. Last edited by: Doug,
March 12, 2013, 09:32 PM
Waz
Yes FORMAT FOCUS will work.

Assuming that there are no nasties that FOCUS DB's don't like.


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!

March 12, 2013, 10:46 PM
Doug
Thanks Waz, That's encouraging. I'll check it out in about 10-11 hours... Smiler
March 14, 2013, 08:45 AM
Doug
Still not there yet...
1) I have a MFD (MY_MFD.mas)
2) I have my SQL passthru (code)
3) I have my report code (report)
ENGINE SQLORA SET DEFAULT_CONNECTION [conn name]
SQL SQLORA PREPARE SQLOUT FOR
select fields from table
;
END
TABLE ON TABLE HOLD AS RPT_DATA FORMAT FOCUS
USE SQLOUT AS MY_MFD
END
TABLE FILE MY_MFD
PRINT fields
END

March 14, 2013, 04:49 PM
Waz
I think your code should be:

ENGINE SQLORA SET DEFAULT_CONNECTION [conn name]
SQL SQLORA PREPARE SQLOUT FOR
select fields from table
;
TABLE FILE SQLOUT
PRINT...
BY ...
ON TABLE HOLD AS RPT_DATA FORMAT FOCUS INDEX ...
END
TABLE FILE RPT_DATA
PRINT fields
END



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!

March 22, 2013, 09:33 AM
Don Garland
You may not need the END after the ;. But, I have seen a warning without it and Report Caster kicks those jobs out having that warning.


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL