Focal Point
[SOLVED] Datatype compatiblity

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/484102991

August 04, 2009, 07:46 AM
Jan1
[SOLVED] Datatype compatiblity
HI,

Am trying to define a field so that i can do some manipulations. For example , i need to show the prescription number , hence i need to do some manipulations liek below :

DEFINE FILE XXX
RX/P20 = IF RX1 EQ LAST RX1 THEN ' ' ELSE RX#;
END

The format of the field is :

RX# E04 P20

Hence when i use P20 as the format i get the below error:

(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: RX

Even if i use D20 , i get the same error.

Can somebody help please ?

Thanks!
Janani

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.9
Windows
Excel, HTML, PDF
August 04, 2009, 08:44 AM
ac1
You can not put space in a numeric field



FOCUS 7.2.0S1
Mainframe - MVS 390
Excel, Flat file

Italy
August 04, 2009, 08:44 AM
Danny-SRL
quote:
DEFINE FILE XXX
RX/P20 = IF RX1 EQ LAST RX1 THEN ' ' ELSE RX#;
END


  
DEFINE FILE XXX
RX/P20 = IF RX1 EQ LAST RX1 THEN 0 ELSE RX#;
END



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

August 04, 2009, 08:49 AM
ac1
quote:
DEFINE FILE XXX
RX/P20 = IF RX1 EQ LAST RX1 THEN ' ' ELSE RX#;
END


If you want use missing value:

DEFINE FILE XXX
RX/P20 MISSING ON = IF RX1 EQ LAST RX1 THEN MISSING ELSE RX#;
END




FOCUS 7.2.0S1
Mainframe - MVS 390
Excel, Flat file

Italy
August 06, 2009, 05:46 AM
<JG>
Alternativly define RX as RX=P20S

That will suppress the zero for display purposes but will allow counts to work correctly if you are using them.
August 10, 2009, 12:49 AM
Jan1
Thanks for all your help!!!

Janani


WebFOCUS 7.6.9
Windows
Excel, HTML, PDF