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] WP Foramt issue

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] WP Foramt issue
 Login/Join
 
Silver Member
posted
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, 2006Report This Post
Expert
posted Hide Post
This is a hangover from the old Mainframe 3270 days, the columns are for print control.

My suggestion is to read the WP file and strip the first two chars from it.

I think there are examples in the forum already.


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
Silver Member
posted Hide Post
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, 2006Report This Post
Expert
posted Hide Post
Please try this.
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


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
Expert
posted Hide Post
quote:
We have a report requirement for WP format
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, 2004Report This Post
Expert
posted Hide Post
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, 2004Report This Post
<JG>
posted
Why not try the correct version of the HOLD format

ON TABLE PCHOLD FORMAT WP NOCC

CC is the default for historic reasons
 
Report This Post
Virtuoso
posted Hide Post
JG,

The documentation says:
quote:

NOCC excludes carriage control characters. The position reserved for those characters
remains in the file, but is blank.

So, Novice will be back to sqaure one.

Warren's solution should be ok. Just output the file with SAVE and not HOLD FORMAT WP.

Of course, if Novice also wants page breaks, it will be a bit more tricky...


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
Silver Member
posted Hide Post
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, 2006Report This Post
Expert
posted Hide Post
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? Wink

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 Frowner 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 Razzer). 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.

T

This 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, 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     [CLOSED] WP Foramt issue

Copyright © 1996-2020 Information Builders