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.
I don't think you can do that. It wouldn't make much sense because each row could potentially have a different number of columns, and the file would not be able to be read by the generated master.
APP HOLDMETA TESTFM
APP HOLDDATA TESTFM
-RUN
TABLE FILE CAR
PRINT
*
ON TABLE HOLD AS H001DFIX FORMAT DFIX DELIMITER .
END
-RUN
TABLE FILE H001DFIX
PRINT *
END
-RUN
If you will be using this file in an external application and don't care about the number of columns, here is an example that might work for you. It uses the EMPLOYEE database which is a sample database supplied with WebFOCUS. It creates a HOLD file in DFIX format, including the blank columns. Then I create a temporary master that defines one column containing all the columns in the row.
I use the STRREP (Replacing Character Strings) function to remove the DFIX character for the blank columns. I have used # as the DFIX character because . will be confused with a decimal point.
SET HOLDLIST=PRINTONLY
APP HOLDMETA testfm
APP HOLDDATA testfm
-RUN
TABLE FILE EMPLOYEE
PRINT
EMP_ID
LAST_NAME
FIRST_NAME
BANK_NAME
BANK_ACCT
ED_HRS
SALARY
ON TABLE HOLD AS H001DFIX FORMAT DFIX DELIMITER #
END
-RUN
FILEDEF MASTER DISK h001dfix1.mas
-RUN
-WRITE MASTER FILENAME=H001DFIX1, SUFFIX=FIX, $
-WRITE MASTER SEGNAME=H001DFIX1, $
-WRITE MASTER FIELDNAME=LINE1, FORMAT=A400, ACTUAL=A400, $
FILEDEF H001DFIX1 DISK testfm/h001dfix.ftm
-RUN
TABLE FILE H001DFIX1
PRINT
COMPUTE LINE2/A400 =
STRREP (400, LINE1, 3, '# #', 1, '#', 400, 'A400');
-*STRREP (inlength, instring, searchlength, searchstring, replength, repstring, outlength, outstring)
END
-RUN
Before people start hurling abuse at you for not filling out your Signature, please visit your Profile and click on "View/Edit Complete Profile", which is where you can enter the version of WebFOCUS and other information in the "Signature".
Regards,This message has been edited. Last edited by: Francis Mariani,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
I appreciate the notice and I have changed my signature!!
So, my next question is how would I correct the code below to get the ON TABLE HOLD AS MATESTHLD FORMAT DFIX DELIMITER . (customer needs the format to include periods) to do what is proposed? Or is there another command that is like the COMT, reason being is the COMT does what I am looking for with the columns, but instead of ","....simply . ??
_*******
FILEDEF MATESTHLD DISK /usr/home/ftp/pub/matesthld.ftm
TABLE FILE FTPSCRIPTDATA PRINT NAME IDNUM STARTDATE ENDDATE ON TABLE SET STYLE * ENDSTYLE ON TABLE HOLD AS MATESTHLD FORMAT DFIX DELIMITER . END
Also, another problem I am having is the Unix commands do not recognize the bolded text above, and ends ftp-ing at the put statement...fails and exits before completion.
I can answer the last question. You have to put all of your Unix commands in a script and then execute the script. In WF, everytime you say unix or !, it drops to the shell, executes the command, and them comes back to WF. Since ftp is interactive, you have to stay in the same session which is why you need to execute a script instead.
I am able to successfully ftp and I have done so before, I thank you for your suggestion and will note it...does anyone else have any other comments about that though?This message has been edited. Last edited by: Mayor,