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     [CLOSED]Plain Text output with some modifications

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Plain Text output with some modifications
 Login/Join
 
Gold member
posted
I need to create a file in plain text and when i browsed focal point i found out you can use
ON TABLE PCHOLD FORMAT DOC as output which is partially there. I need some assistance figuring out the last bit.

Below is the expected output and i have some questions:

A) How i can remove leading zeros? Based off another thread i see i can place <0> before headings but there is still one space.

B) How i can remove leading zeros from fields on the report?

C) How can i add 14 spaces between two columns?

-* the first string 1234567...25 based on a field
-* there are 14 spaces shown as _
-* 1234 is right aligned based off another field
1234567...25______________1234


Thank you!

This message has been edited. Last edited by: <Emily McAllister>,


WebFocus 8.02, SQL Server 2008r2
 
Posts: 51 | Registered: November 30, 2012Report This Post
Virtuoso
posted Hide Post
Hi cs,

You do not say what you want to do with your plain text file:
1. Use it as input to something?
2. Create a WORD document?
3. Simply print it?
4. Anything else?
If you do use FORMAT DOC, you should not see any leading zeros, unless you have an L option on a numeric field; and a field containing 14 spaces should display as 14 spaces.

Could you post your code, preferably a repro using the CAR file?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
From what you have said, I think HOLD FORMAT ALPHA may be a better way.

You can use FPRINT to format the fields.

But as Danny says, what do you want to use it for, it has a large bearing on the method to be used.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
I'm in total agreement with Danny and Waz - not just concerning this post but posts in general. It helps an awful lot if the general objective is spelled out at the beginning before getting to the code. Often enough there is a completely different and better way to accomplish something rather than tinkering with code that is already lame to start with.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Expert
posted Hide Post
I'm in total agreement with Danny, Waz, And George. There are many ways to Skin-A-Cat. But, it's always nice to know what kind of cat it is, Kitty Cat, Bengal or Sabre Tooth Tiger... Confused
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
Thank you Danny and Waz;

The purpose of the file is to upload to an internal application. The file type must be .txt and the type of files needs to follow a standard which is what i'm attempting to configure. My goal for the file is to use Report Caster to place the file on a network share so a co-worker can access the file make any last minute adjustments and then upload to our application.

Waz, when the output is set as ALPHA i notice the header is removed but the leading spaces concern is resolved.

####################################
Below is my code and some notes i have:

DEFINE FILE [SYNONYM]
-*I thought to create this so one of our co-workers knows where to right align the number (14 spaces after Field1). I wasn't sure how to complete this in webfocus?
SPACE/A50=[SYNONYM].[SYNONYM].[FIELD1][||' |';
END

TABLE FILE [SYNONYM]
SUM
COMPUTE [NEW_FIELD1]/I8 = [SYNONYM].[SYNONYM].[FIELD2] * 100; AS 'ALIGN LAST DIGIT WITH |.'
BY LOWEST [SYNONYM].[SYNONYM].SPACE AS 'REMOVE THIS LINE. LEADING SPACES. LINE BELOW'
HEADING
-*I need two headers in the file
"HEADER1"
"HEADER2"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT ALPHA
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=DATA,
COLUMN=N2,
JUSTIFY=LEFT,
$
TYPE=DATA,
COLUMN=N3,
JUSTIFY=LEFT,
$
TYPE=TITLE,
COLUMN=N2,
JUSTIFY=LEFT,
$
TYPE=TITLE,
COLUMN=N3,
JUSTIFY=LEFT,
$
TYPE=HEADING,
LINE=1,
JUSTIFY=LEFT,
$
TYPE=HEADING,
LINE=2,
JUSTIFY=LEFT,
$
TYPE=REPORT,
COLUMN=N2,
SQUEEZE=ON,
$
TYPE=REPORT,
COLUMN=N1,
SQUEEZE=ON,
$
ENDSTYLE
END

################################################
The output file will look like this:

HEADER1
HEADER2
REMOVE THIS LINE. LEADING SPACES. LINE BELOW ALIGN LAST DIGIT WITH |.
-------------------------------------------- ------------------------
XXXXXXXXXXXXXXXXXXXXXXXXX | 999

################################################
The final state of the file should look like this:

HEADER1
HEADER2
XXXXXXXXXXXXXXXXXXXXXXXXX 999


WebFocus 8.02, SQL Server 2008r2
 
Posts: 51 | Registered: November 30, 2012Report 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     [CLOSED]Plain Text output with some modifications

Copyright © 1996-2020 Information Builders