Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] ON TABLE SAVE FILENAME - Output FlatFile to Multiple Locations?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] ON TABLE SAVE FILENAME - Output FlatFile to Multiple Locations?
 Login/Join
 
Member
posted
Is it possible to output a single flat file to multiple locations? I need to provide copy of several flat files on our old server, until all end users are completely moved to the new server.

I've tried the following, but it only outputs the last one.

ON TABLE SAVE FILENAME
'\\Slchome\Dept\Buyers\C.M.A.T\cat_manager_id.csv'
FORMAT COMT

ON TABLE SAVE FILENAME
'\\Slcfiler1\Dept\Buyers\z_DataSources\cat_manager_id.csv'
FORMAT COMT

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


WebFOCUS 7.6.11, Windows XP, Excel, HTML, PDF
 
Posts: 25 | Location: Salt Lake City | Registered: June 03, 2008Report This Post
Guru
posted Hide Post
Use APP HOLD to hold the files in a specific app folder.
Then use Windows commands to copy the hold files.
  
APP HOLD TESTING

TABLE FILE CAR 
PRINT
    CAR
BY COUNTRY
ON TABLE HOLD AS HOLD_CAR FORMAT COMT
END

-WINNT COPY \\WebFocus_ServerName\IBI\APPS\TESTING\HOLD_CAR.CSV \\Slchome\Dept\Buyers\C.M.A.T\cat_manager_id.csv
-WINNT COPY \\WebFocus_ServerName\IBI\APPS\TESTING\HOLD_CAR.CSV \\Slcfiler1\Dept\Buyers\z_DataSources\cat_manager_id.csv



WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Expert
posted Hide Post
You should be able to FILEDEF the files before hand and direct the output to each one -

FILEDEF OUTPUT1 DISK \\Slchome\Dept\Buyers\C.M.A.T\cat_manager_id.csv
FILEDEF OUTPUT2 DISK \\Slcfiler1\Dept\Buyers\z_DataSources\cat_manager_id.csv
FILEDEF OUTPUT3 DISK \\Slcfiler1\Dept\Buyers\someotherfolder\cat_manager_id.csv
TABLE FILE CAR
SUM RCOST DCOST
 BY COUNTRY
 BY CAR
 BY MODEL
ON TABLE SAVE AS OUTPTU1 FORMAT COMT
END
SAVE AS OUTPUT2 FORMAT COMT
SAVE AS OUTPUT3 FORMAT COMT

Not tested the same but it should be OK.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Max,

You don't even need to place it in an APP folder, just copy it from the EDATEMP folder -
DOS COPY HOLD_CAR.CSV \\Slchome\Dept\Buyers\C.M.A.T\cat_manager_id.csv
DOS COPY HOLD_CAR.CSV \\Slcfiler1\Dept\Buyers\z_DataSources\cat_manager_id.csv

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
just copy from the agent directory, as T says, but slight warning: don't copy .ftm's unless they're saved format alpha. All kinds of messes ensue, the .mas just aren't the same.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Thank you very much Max & Tony for your time & recommendations. All three worked examples perfectly.


WebFOCUS 7.6.11, Windows XP, Excel, HTML, PDF
 
Posts: 25 | Location: Salt Lake City | Registered: June 03, 2008Report This Post
Member
posted Hide Post
Tony A, A few weeks ago you help me with a FILEDEF OUTPUT(multi) DISK. I have a similar one that outputs 2 files, but there are no records. The difference in this one is a JOIN & DEFINE. See example below:

FILEDEF OUTPUT1 DISK \\Slchome\Dept\Buyers\C.M.A.T\Brand.csv
FILEDEF OUTPUT2 DISK \\Slcfiler1\Dept\Buyers\z_DataSources\Brand.csv
JOIN
P_BRAND.P_BRAND.BRAND_CLASS_ID IN P_BRAND TO UNIQUE
P_BRAND_CLASS.P_BRAND_CLASS.BRAND_CLASS_ID IN P_BRAND_CLASS AS J0
END
DEFINE FILE P_BRAND
ID/A5=EDIT(BRAND_ID,'$99999');
END
TABLE FILE P_BRAND
PRINT
ID AS 'ID-TEXT'
BRAND_DESC AS 'BRAND DESC'
BRAND_CLASS_ID AS 'BRAND-CLASS-ID'
BRAND_CLASS_DESC AS 'BRAND CLASS DESC'
BY BRAND_ID AS 'BRAND-ID'
ON TABLE SAVE AS OUTPUT1 FORMAT COMT
END
SAVE AS OUTPUT2 FORMAT COMT
-EXIT

quote:
Originally posted by Tony A:
You should be able to FILEDEF the files before hand and direct the output to each one -

FILEDEF OUTPUT1 DISK \\Slchome\Dept\Buyers\C.M.A.T\cat_manager_id.csv
FILEDEF OUTPUT2 DISK \\Slcfiler1\Dept\Buyers\z_DataSources\cat_manager_id.csv
FILEDEF OUTPUT3 DISK \\Slcfiler1\Dept\Buyers\someotherfolder\cat_manager_id.csv
TABLE FILE CAR
SUM RCOST DCOST
 BY COUNTRY
 BY CAR
 BY MODEL
ON TABLE SAVE AS OUTPTU1 FORMAT COMT
END
SAVE AS OUTPUT2 FORMAT COMT
SAVE AS OUTPUT3 FORMAT COMT

Not tested the same but it should be OK.

T


WebFOCUS 7.6.11, Windows XP, Excel, HTML, PDF
 
Posts: 25 | Location: Salt Lake City | Registered: June 03, 2008Report This Post
Expert
posted Hide Post
quote:
but there are no records

Assuming that write permissions are all correct .... Do you mean no records in either file or records in OUTPUT1 but not in OUTPUT2?

If it is the former then you should be able to answer that, however if it is the latter then try this type of code to validate what is being output -

FILEDEF OUTPUT1 DISK cat_manager_id1.csv
FILEDEF OUTPUT2 DISK cat_manager_id2.csv
FILEDEF OUTPUT3 DISK cat_manager_id3.csv
TABLE FILE CAR
SUM RCOST DCOST
 BY COUNTRY
 BY CAR
 BY MODEL
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE SAVE AS OUTPUT1 FORMAT COMT
END
SAVE AS OUTPUT2 FORMAT COMT
SAVE AS OUTPUT3 FORMAT COMT
CMD TYPE cat_manager_id*.csv

Running this I get -

 0 NUMBER OF RECORDS IN TABLE=        4  LINES=      4
 cat_manager_id1.csv
 "COUNTRY","CAR","MODEL","RETAIL_COST","DEALER_COST"
 "ENGLAND","JAGUAR","V12XKE AUTO",8878,7427
 "ENGLAND","JAGUAR","XJ12L AUTO",13491,11194
 "ENGLAND","JENSEN","INTERCEPTOR III",17850,14940
 "ENGLAND","TRIUMPH","TR7",5100,4292
 cat_manager_id2.csv
 "COUNTRY","CAR","MODEL","RETAIL_COST","DEALER_COST"
 "ENGLAND","JAGUAR","V12XKE AUTO",8878,7427
 "ENGLAND","JAGUAR","XJ12L AUTO",13491,11194
 "ENGLAND","JENSEN","INTERCEPTOR III",17850,14940
 "ENGLAND","TRIUMPH","TR7",5100,4292
 cat_manager_id3.csv
 "COUNTRY","CAR","MODEL","RETAIL_COST","DEALER_COST"
 "ENGLAND","JAGUAR","V12XKE AUTO",8878,7427
 "ENGLAND","JAGUAR","XJ12L AUTO",13491,11194
 "ENGLAND","JENSEN","INTERCEPTOR III",17850,14940
 "ENGLAND","TRIUMPH","TR7",5100,4292

So you can see the code works as I get all three files listed.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] ON TABLE SAVE FILENAME - Output FlatFile to Multiple Locations?

Copyright © 1996-2020 Information Builders