Jeff:
Thanks for your advice. Due to the settings of our system, when I ran my
UniObject Codes, I have to force the codes to use another language setting:
ISO-8859-1. Then @VM and @FM works.
Jeff Powell wrote:
>
> Sorry I meant to type LANG=en_US.iso886915.
>
> This is a known limitation I learned of in IBM's UOJ class.
>
> Note the difference below. In this sample Attribute 136 is MV with 8 @VM
> marks as viewed in screen edit.
>
> Default: LANG=en_US.utf8
>
> [EMAIL PROTECTED] uojCounter]$ java -jar dist/uojCounter.jar
> UniString: 273
> UniDynArray:273
> UniString: F136 1
> UniDynArray: F136 1
>
> [EMAIL PROTECTED] uojCounter]$ LANG=en_US.iso885915 java -jar
> dist/uojCounter.jar
> UniString: 218
> UniDynArray:218
> UniString: F136 1
> UniDynArray: F136 9
>
> On Mon, 2008-06-09 at 23:05 -0700, waivic wrote:
>
>> Jeff, I try your suggestion: export LANG=iso885915. It doesn't look like
>> working neither. It has the same effect with LANG variable set to C. Any
>> other suggestion?
>>
>>
>> Jeff Powell wrote:
>> >
>> > Try setting yourLANG variable before executing your program.
>> >
>> > export LANG=iso885915
>> >
>> > This is a Linux only problem with UOJ. It is the same for java apps and
>> > servlets.
>> >
>> >
>> > On Mon, 2008-06-02 at 16:17 -0700, waivic wrote:
>> >
>> >> I have a very simple file-TESTS, which only has 4 fields: @ID field,
>> F1,
>> >> F2
>> >> and F3. F1 is a single value field, F2 is a multi-value field and the
>> >> value
>> >> is one value-mark-separated list, F3 is a single value field. It has
>> the
>> >> following sample record in the file:
>> >>
>> >> Field Name Value
>> >> @ID t101
>> >> F1 F1V1
>> >> F2 F2V1:@VM:F2V2
>> >> F3 F3V1
>> >>
>> >> I use the following UniObject for Java code segment to retrieve the
>> >> record
>> >> "t101" from the file:
>> >>
>> >> //uSession is a UniSession Oject
>> >> uSession.connect();
>> >>
>> >> //Open a file variable to TESTS file.
>> >> UniFile testFile = uSession.open("TESTS");
>> >>
>> >> //Read the record out
>> >> String key = "t101";
>> >> UniStirng uString = personFile.read(key);
>> >> System.out.println(bthe full record:b+uString);
>> >> System.out.println(bthe number of fields in the file:b
>> >> +uString.dcount());
>> >>
>> >>
>> >> When I print out the contents of the record, it looks like UOJ
>> converts
>> >> all
>> >> the value marks at the field F2 into the field mark. When I use
>> dcount()
>> >> function to count the number of fields in the output, it returns 5,
>> >> instead
>> >> of 4. I think the correct result should be 4 since only 4 fields (@ID
>> >> field, F1, F2 and F3) in the file. It seems that read() function
>> converts
>> >> all the value-marks into the field-marks. So the values at the
>> field-F2:
>> >> F2V1:@VM:F2V2 becomes F2:@FM:F2V2. That is why I got 5 instead of 4
>> when
>> >> we
>> >> use dcount() to count the number of fields in the output.
>> >>
>> >> We are running Unidata 7.1 in Red hat Linux server. I already set the
>> >> environment variable LANG to bCb. I even tried to set LANG to
>> >> ben_USb. Both
>> >> times, the UOJ program returned the same result.
>> >>
>> >> Does anyone know how this happens? I want to keep the original
>> >> value-marks
>> >> and field-marks after using read() function. Please advice.
>> > -------
>> > u2-users mailing list
>> > [email protected]
>> > To unsubscribe please visit http://listserver.u2ug.org/
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
>
>
--
View this message in context:
http://www.nabble.com/UOJ-and-value-mark-and-field-mark-tp17612976p17988113.html
Sent from the U2 - Users mailing list archive at Nabble.com.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/