When using EDIT in FOCUS or WebFOCUS you only need to mask the positions that you are using. So to extract the first 5 postitions of any string you would need: S/A5=EDIT(Y,'99999');
IF you want the second 5, you would need S/A5=EDIT(Y,'$$$$$99999');
You only need to mask the entire string if the characters you want are at the end.
My problem is that the field I am editing is defined as VARCHAR and teh EDIT stops when it hits a blank. So, if the field contains the string
quote:
This message goes on and on and on and on...
, I should be getting back
quote:
This message on and
. Instead I get
quote:
This
.
How can I ensure that I will get the full 20 characters?
Thank you, Brad.This message has been edited. Last edited by: BGronli,
7.7, z/OS & Win7, excel & pdf 8.2 testing
June 28, 2013, 12:18 PM
RSquared
Can you please post your code snippet.
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit
June 28, 2013, 01:54 PM
BGronli
DEFINE FILE IWNEWS
TXT/A20 = EDIT(NEWS_TXT,'99999999999999999999');
END
7.7, z/OS & Win7, excel & pdf 8.2 testing
June 28, 2013, 03:00 PM
RSquared
Please post the field definition in the .mas file.
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit
June 28, 2013, 06:38 PM
j.gross
I would use SUBSTRV() rather then EDIT()
June 29, 2013, 01:02 AM
badri
Hello brad, Do you want the first 20 characters irrespective of whatever value is in that field or is it something else? thanks Badri
WF 7.6.11, oracle 11g ,windows PDF , excel, AHTML
June 29, 2013, 01:25 AM
badri
I agree with j.gross. USE SUBSTR() if its a fixed length field OR SUBSTV() if the field is of variable lengths as defined in ur master file.
and had the same results. I am only getting characters up to the first blank space. NEWS_TXT, on the database contains: This is a test of the Information Warehouse News Message entry system and table. If this had been an actual Information Warehouse News Message, you would have been informed of something meaningful.
Thank you all for the replies. I have determined the problem was between the seat and the keyboard. It actually had to do with another piece of the define which builds the html I am returning to the page: