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] (FOC015) THE TEST VALUE IS LONGER THAN THE FIELD FORMAT LENGTH
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] (FOC015) THE TEST VALUE IS LONGER THAN THE FIELD FORMAT LENGTH
 Login/Join
 
Gold member
posted
hi,

i have below code and its throwing below error , im guessing its IF else statemnet issue but could not resolve it . if someone can help me with it/

(FOC015) THE TEST VALUE IS LONGER THAN THE FIELD FORMAT LENGTH: HOME ROAMER MSG

CODe is as below

  
 -IF 0      NE 0 GOTO ERR;
 -*
 DEFINE FILE UPCS15
 BILL_C/A7='/   ';
 CYCOD_C/A2=' ';
 AIR_DUR_LLK/P16.4=AIR_DUR_IN_MIN;
 TOLL_DUR_LLK/P16.4=TOLL_DUR_IN_MIN;
 -*  chnage
 SORT1/A7 = IF MESSAGE_TYPE EQ 'HOME MSG'        THEN 'HOME'
       ELSE IF MESSAGE_TYPE EQ 'ROAMING MSG'     THEN 'ROAMING'
       ELSE IF MESSAGE_TYPE EQ 'HOME ROAMER MSG' OR 'EXT. HOME MSG' THEN 'HRM'
       ELSE IF MESSAGE_TYPE EQ 'GPRS ROAM MSG'   THEN 'GPRS' ;
 -*
 SORT2/A9=SORT1||CANCEL_IND||BALANCE_DATE;
 SORTP/A15=SORT2||AIR_FREE_CODE_IND||CALL_FRWD_IND;
 -*
 END
 -RUN



and mas file has structure as below

FILE=upcs15 ,SUFFIX=FIX
SEGNAME=FIRST
FIELDNAME=FTR_SERVICE_TYPE ,ALIAS= ,FORMAT=A1 ,ACTUAL=A1 ,$
FIELDNAME=SUB_MARKET_CODE ,ALIAS= ,FORMAT=A3 ,ACTUAL=A3 ,$
FIELDNAME=CANCEL_IND ,ALIAS= ,FORMAT=A1 ,ACTUAL=A1 ,$
FIELDNAME=CANCELING_ENTITY ,ALIAS= ,FORMAT=A1 ,ACTUAL=A1 ,$
FIELDNAME=MESSAGE_TYPE ,ALIAS= ,FORMAT=A13 ,ACTUAL=A13 ,$
FIELDNAME=BALANCE_DATE ,ALIAS= ,FORMAT=A1 ,ACTUAL=A1 ,$
FIELDNAME=AIR_FREE_CODE_IND,ALIAS= ,FORMAT=A1 ,ACTUAL=A1 ,$
FIELDNAME=CALL_FRWD_IND ,ALIAS= ,FORMAT=A1 ,ACTUAL=A1 ,$
FIELDNAME=NUM_OF_USG ,ALIAS= ,FORMAT=I9 ,ACTUAL=I4 ,$
FIELDNAME=AIR_CHARGES ,ALIAS= ,FORMAT=P13.2 ,ACTUAL=P6 ,$
FIELDNAME=AIR_DUR_IN_MIN ,ALIAS= ,FORMAT=P19.4 ,ACTUAL=P9 ,$
FIELDNAME=TOLL_CHARGES ,ALIAS= ,FORMAT=P13.2 ,ACTUAL=P6 ,$
FIELDNAME=TOLL_DUR_IN_MIN ,ALIAS= ,FORMAT=P19.4 ,ACTUAL=P9 ,$
FIELDNAME=AC_CHARGES ,ALIAS= ,FORMAT=P13.2 ,ACTUAL=P6 ,$
FIELDNAME=TAXES ,ALIAS= ,FORMAT=P13.2 ,ACTUAL=P6 ,$



Thanks in advance for ur help

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS, Linux
Excel, CSV
 
Posts: 62 | Registered: May 23, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
IF MESSAGE_TYPE EQ 'HOME ROAMER MSG'

FIELDNAME=MESSAGE_TYPE ,ALIAS= ,FORMAT=A13 ,ACTUAL=A13 ,$


You really cannot work this one out?

Perhaps it's time to take a maths class?

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: 5575 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
quote:
Perhaps it's time to take a maths class?

... or be change you screen name? Smiler

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
 
Posts: 103 | Registered: April 06, 2009Reply With QuoteReport This Post
Gold member
posted Hide Post
hi,

I already tried code with changing size to A15/A13 still showing same error.


WebFOCUS, Linux
Excel, CSV
 
Posts: 62 | Registered: May 23, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
HOME ROAMER MSG

The string is longer than the ACTUAL length, as defined in the metadata for table or file you're reading.

If you view the data in the table or file, do you see that value?

How was the metadata for this table or file created?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Genius:
...
SORT1/A7 = IF MESSAGE_TYPE EQ 'HOME MSG' THEN 'HOME'
ELSE IF MESSAGE_TYPE EQ 'ROAMING MSG' THEN 'ROAMING'
ELSE IF MESSAGE_TYPE EQ 'HOME ROAMER MSG' OR 'EXT. HOME MSG' THEN 'HRM'
ELSE IF MESSAGE_TYPE EQ 'GPRS ROAM MSG' THEN 'GPRS' ;
...


Just to note in passing -- In a cascade of "if then else" clauses in a Define, always provide a final "ELSE '...'", to control what happens when none of the conditions is fired.

As it stands, if MESSAGE_TYPE is none of the above in a particular incoming record, then the value for SORT1 is unspecified (and will probably be the holdover value from the previous record). And it looks like incoming values of 'HOME ROAMER M', which is none of the above, can be anticipated.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
If this came across a bit harsh then I apologise .... However,

You really need to do your searches before you post questions like this because most of what you have asked has arisen and been answered before. A little research on your part would likely have given you indications of what the issue was. You then have to really examine what the message is telling you and you should be able to work out the resolution.


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: 5575 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
How many people does it take to help a genius? Big Grin


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] (FOC015) THE TEST VALUE IS LONGER THAN THE FIELD FORMAT LENGTH

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