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 am trying to create a fixed length records in a txt file through dialog manager -WRIT command, here is my sample code:
-SET &LINE1 = 'This is Line 1'; -SET &LINE2 = 'This is Line 2'; -RUN APP FI TESTFILE DISK abs_ep_interfaces/test.txt (APPEND RECFM F LRECL 1000 -RUN -WRITE TESTFILE &LINE1 -WRITE TESTFILE &LINE2 -RUN
The output I got is one line record instead of 2 lines of 1000 characters.
With RECFM V, I can get two lines but I lost spaces at the end of each line so it can not be fixed length record.
I want each -WRITE command to write a record in separate line and each line should have 1000 characters padded with trailing spaces.
Thanks in advance.
-vaidyaThis message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.10 UNIX, WINDOWS PDF, HTML, Text
Posts: 15 | Location: Richmond, VA | Registered: May 05, 2010
Until we get an explanation from Tech Support, here is a possible workaround, as long as you can tolerate a non-blank character as the last character in each row.
-SET &LINE1 = 'This is Line 1';
-SET &LINE2 = 'This is Line 2';
-SET &LINE1X = SUBSTR(&LINE1.LENGTH, &LINE1, 1, &LINE1.LENGTH, 999, 'A999');
-SET &LINE2X = SUBSTR(&LINE2.LENGTH, &LINE2, 1, &LINE2.LENGTH, 999, 'A999');
-*APP FILEDEF TESTFILE DISK BASEAPP/TEST1.FTM ( LRECL 1000 RECFM F
APP FILEDEF TESTFILE DISK BASEAPP/TEST1.FTM
-RUN
-WRITE TESTFILE &LINE1X._
-WRITE TESTFILE &LINE2X._
-RUN
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
Francis, Waz, JG - Thank you so much for your responses.
Francis - Your workaround solution is good for now but I have to talk to my users to agree it. Thank you so much for creating case also.
JG - Your solution is really worked out for my problem eventhough it requires two steps approach. Sorry for putting double posting which is not my intention too. Since I did not get answer initially, so I thought of splitting this question as two questions and I put two other posts so that people can easily catch it and answer it.
Thank you so much for all your help.
WebFOCUS 7.6.10 UNIX, WINDOWS PDF, HTML, Text
Posts: 15 | Location: Richmond, VA | Registered: May 05, 2010