Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] D12.2% or D12.2!D not working in text format
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] D12.2% or D12.2!D not working in text format
 Login/Join
 
Guru
posted
Hi,

I have a field which is of format D20.2 and since I need to append the % sign or the !sign to it, Iam trying to convert it into D12.2% or D12.2!D as per the below code:

TABLE FILE TABLE1
PRINT
COL1
COL2/D12.2!D
COL3/D12.2%
ON TABLE PCHOLD FORMAT DFIX DELIMITER | HEADER YES
END
-RUN

But the % and the ! signs are not getting appended to the value and it works in other formats like html and excel.

Any thoughts/help on the same would be appreciated.

Thanks a lot in advance!

Regards,
IP

This message has been edited. Last edited by: <Kathryn Henning>,


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
When you use a format option, it is for display purposes only (e.g. excel, html, pdf etc.). As you are HOLDing the data then these options do not apply. You can use FPRINT to convert if you need this within the HOLD file.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Reply With QuoteReport This Post
Guru
posted Hide Post
Hi,

Thanks Alan for the quick response and for the solution.
I will try it and will let you know if it works or not.

Regards,IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Reply With QuoteReport This Post
Guru
posted Hide Post
Hi,

Iam trying the below format but it is not working :
COMPUTE ALPHA_D/D20.2 = FPRINT(COL2,'D12.2!D', 'D20.2');

It is throwing the below error message :
(FOC36355) INVALID TYPE OF ARGUMENT #3 FOR USER FUNCTION FPRINT
(FOC009) INCOMPLETE REQUEST STATEMENT
BYPASSING TO END OF COMMAND

Any hints/ideas on how to get it worked would be appreciated.

Thanks a lot in advance!

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Reply With QuoteReport This Post
Expert
posted Hide Post
Try looking at the help files for FPRINT and you will see where you've made a mistake.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5601 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Looking up FPRINT in the manual would have been faster than posting here...



Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Guru
posted Hide Post
Hi Tom,

I had a look at the manual but even then I couldn't find anything related to the format I was looking for and hence posted here hoping to get some solution.

Anyways thanks a lot !

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Reply With QuoteReport This Post
Expert
posted Hide Post
"Display Only" values are not valid. Hit the Search button, FPRINT, and, there are 7 pages of examples...


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Guru
posted Hide Post
Hi,

Thanks a lot Tom.
Iam looking into those pages only.

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Reply With QuoteReport This Post
Expert
posted Hide Post
Have a look at the "output" type in the help page that Tom posted, it shows "alphanumeric". The clue is also in the title of the page -
"FPRINT - Converting Fields to Alphanumeric Format"

quote:
COMPUTE ALPHA_D/D20.2 = FPRINT(COL2,'D12.2!D', 'D20.2');


The D20.2 format of your computed field is not alphanumeric it is numeric. Hence the error message that you receive.


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5601 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Guru
posted Hide Post
Hi,

Thank you Tony...

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] D12.2% or D12.2!D not working in text format

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.