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.
Just wondering, if anybody knows the solution for our current issue…We have a report requirement for WP format. Report works fine & issue is " 2 blanks spaces are appended at beginning of each line" Any magic SET statement or work around to remove 2 blank spaces?
TABLE FILE CAR
PRINT *
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET PAGE-NUM NOPAGE
ON TABLE PCHOLD FORMAT WP
END
This message has been edited. Last edited by: Kerry,
Posts: 36 | Location: Boston MA | Registered: October 12, 2006
Thanks WAZ. I tried looking for solution in Forum, but couldn't find any concrete solution.
----------------------------------------------- My suggestion is to read the WP file and strip the first two chars from it. ----------------------------------------------- Can you provide a sample program on CAR file. or more explanation on "read the WP file and Strip the first two chars from it".
Thanks
Posts: 36 | Location: Boston MA | Registered: October 12, 2006
TABLE FILE CAR
PRINT COUNTRY CAR MODEL
ON TABLE SAVE AS WP_DOC FORMAT WP
END
-RUN
EX -LINES 5 EDAPUT MASTER,WP_DOC,CV,FILE
FILENAME=WP_DOC, SUFFIX=FIX,$
SEGNAME=WP_DOC, $
FIELD=PRNTCTRL ,ALIAS= ,A2 ,A2 ,$
FIELD=LINE ,ALIAS= ,A130 ,A130 ,$
-RUN
TABLE FILE WP_DOC
PRINT *
END
What specifically about the WP format is it that you require? Fixed font?
How is this file going to be used?
Waz's suggestion will certainly split off the two spaces from the held file, but as soon as you go to FORMAT WP again you'll get the spaces back - they are part of the file. So unless you just send the file direct to printer you might still have problems - hence the question above about it's use.
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, 2004
You could just read the file in and strip off the first two chars before placing the rest of the line into another pre filedef'd file. You would have to identify what the length of each line is and adjust the amper variables accordingly -
FILEDEF WP_OUT DISK c:\ibi\apps\baseapp\wp_out.doc
TABLE FILE CAR
PRINT COUNTRY CAR MODEL
ON TABLE SAVE AS WP_DOC FORMAT WP
ON TABLE SET PAGE NOLEAD
END
-RUN
-* Add two to &LINES to cater for heading lines
-SET &Iter = &LINES + 2;
-REPEAT :Loop FOR &Cnt FROM 1 TO &Iter;
-READ WP_DOC &X.A2. &Rest.A55.
-WRITE WP_OUT &Rest
-:Loop
But again, I would ask what the intended use is because there may be a better method.
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, 2004
Tony A - Requirement: Generate report with header, page breaks, page numbers, subtotals..etc. in WP format, This file is used by Mainframe to read data/characters positioned as per requirement.
Posts: 36 | Location: Boston MA | Registered: October 12, 2006
So the basic requirement is to have specifically positioned characters so that it can be read into a mainframe process? So why does it need headers and page numbers? What is the mainframe process going to do with the data - format it into a report for printing / display on screen?
I suppose I need to ask if this is a training exercise as it sounds as though someone has designed the end product (the mainframe process) from a set input style rather than design the whole process from data extract to end product? Still, what would I know eh?
There are many other questions that I would ask of this such as, if you need to have page breaks then why (bearing in mind the page break control character is in the first character position due to mainframe legacy) would you want to eradicate the first two columns? What ever the end process is written in I would rather have the data in "raw" format than a prepared format such as WP and calculate such things as sub totals, page numbers etc. depending upon the output target medium and the intricacies of the end process language.
Also bear in mind that the RECFM of a file on mainframe would normally containing a training A (as in FBA for fixed blocked or VBA for variable blocked) to depict that the file contains an initial "attribute" byte. Outputs to printer would normally (if memory serves) be RECFM FBA or VBA with LRECL 133 for a 132 column impact printer - yes I am that old That would use the inital char to provide the printer with a "1" for page throw, "0" for line feed etc. (I forget what the "-" did ). I suppose that also throws the question "what file attributes are being used to allow the mainframe process to read it?".
Without knowing the whole picture it is difficult to suggest a way forward other than what has already been mentioned by all contributors here.
TThis message has been edited. Last edited by: Tony A,
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, 2004