Re: [U2] UOJ and value-mark and field-mark

2008-06-18 Thread waivic
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
>> > u2-users@listserver.u2ug.org
>> > To unsubscribe please visit http://listserver.u2ug.org/
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> 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
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[Fwd: Re: [U2] UOJ and value-mark and field-mark]

2008-06-11 Thread Jeff Powell
Here is the main class. I use a "wrapper" class similar to the one you
created to provide access to the UOJ library.

My environments are RHEL 4.5, Fedora 8, Fedora 9 using console, desktop
application, tomcat and glassfish. I use Netbeans as my development
environment.

I hope this helps.

package uojcounter;

import asjava.uniclientlibs.UniDynArray;
import asjava.uniclientlibs.UniString;
import com.ips.controller.unidata;

/**
 *
 * @author jpowell
 */
public class Main {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
unidata ud=new
unidata("your_unidata_server","your_ud_account","joe_user","joes_password");
o;?// opens file and keeps reference in a map key=filename, value=unifile
ud.newFile("ORDER.LINE");
// Write a new record
//UniDynArray test=new UniDynArray();
//test.replace(1, 1, "F1.1");
//test.replace(1, 2, "F1.2");
//test.replace(2, "F2");
//test.replace(3, "F3");
//ud.Write("TEST!REC", test, "MTR.IPS");
// read from the file
UniString str=ud.Read("100T0154145!29", "ORDER.LINE");
UniDynArray udr=ud.Read("100T0154145!29", "ORDER.LINE");

System.out.println("UniString: "+str.dcount());
System.out.println("UniDynArray:"+udr.dcount() );
System.out.println("UniString: F136 "+str.dcount(136));
System.out.println("UniDynArray: F1326 "+udr.dcount(136) );
ud.CloseFiles();
ud.disconnect();
// TODO code application logic here
}

}
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] UOJ and value-mark and field-mark

2008-06-11 Thread waivic
Jeff:

Could you post the UOJ code segment to do the counting work for your example
here?  I want to try them in my environemnt to see the difference. Thanks!


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
>> > u2-users@listserver.u2ug.org
>> > To unsubscribe please visit http://listserver.u2ug.org/
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/UOJ-and-value-mark-and-field-mark-tp17612976p17770929.html
Sent from the U2 - Users mailing list archive at Nabble.com.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UOJ and value-mark and field-mark

2008-06-10 Thread Kathleené M Hunter
NO in the sample you showed a command using @FM change the command to use @AM. 
Then see what the results are.  If this does not work then look at the OS it is 
convert the @VM to @AM, which IBM can advise you on how to correct.



-Original Message-
From: waivic [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 11:07 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] UOJ and value-mark and field-mark

Kathleene and Anthony, you are saying "Change the @FM to @AM to see if what
the results are". What do you mean that? Do I need to change the @FM TO @AM
inside the File? Thanks!


KathleenC)  M Hunter wrote:
> 
> Change the @FM to @AM  see if what the results are.
> 
> -Original Message-
> From: waivic [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 02, 2008 4:18 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] UOJ and value-mark and field-mark
> 
> 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. 
> 
> -- 
> View this message in context:
> http://www.nabble.com/UOJ-and-value-mark-and-field-mark-tp17612976p17612976.html
> Sent from the U2 - Users mailing list archive at Nabble.com.
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/UOJ-and-value-mark-and-field-mark-tp17612976p17748368.html
Sent from the U2 - Users mailing list archive at Nabble.com.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Correction: Re: [U2] UOJ and value-mark and field-mark

2008-06-10 Thread Jeff Powell
Sorry I meant to type LANG=en_US.iso885915.

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
> > u2-users@listserver.u2ug.org
> > To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] UOJ and value-mark and field-mark

2008-06-10 Thread Jeff Powell
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
> > u2-users@listserver.u2ug.org
> > To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UOJ and value-mark and field-mark

2008-06-09 Thread waivic
Kathleene and Anthony, you are saying "Change the @FM to @AM to see if what
the results are". What do you mean that? Do I need to change the @FM TO @AM
inside the File? Thanks!


KathleenC)  M Hunter wrote:
> 
> Change the @FM to @AM  see if what the results are.
> 
> -Original Message-
> From: waivic [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 02, 2008 4:18 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] UOJ and value-mark and field-mark
> 
> 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. 
> 
> -- 
> View this message in context:
> http://www.nabble.com/UOJ-and-value-mark-and-field-mark-tp17612976p17612976.html
> Sent from the U2 - Users mailing list archive at Nabble.com.
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/UOJ-and-value-mark-and-field-mark-tp17612976p17748368.html
Sent from the U2 - Users mailing list archive at Nabble.com.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] UOJ and value-mark and field-mark

2008-06-09 Thread waivic
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
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/UOJ-and-value-mark-and-field-mark-tp17612976p17748350.html
Sent from the U2 - Users mailing list archive at Nabble.com.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UOJ and value-mark and field-mark

2008-06-09 Thread Kathleené M Hunter
Never done UOJ but had this happen and is was caused by the OS change the
@VM to @AM marks. Know we had to make a setting change but do not remember
what it was, it was a long time ago. But I do remember that IBM Tech Support
was invalid. Have to check with them about the issue. 



-Original Message-
From: Anthony Grant [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 07, 2008 9:10 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] UOJ and value-mark and field-mark

- Original Message -
From: [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
To: u2-users@listserver.u2ug.org 
Sent: Sun Jun 08 00:35:12 2008
Subject: RE: [U2] UOJ and value-mark and field-mark

Change the @FM to @AM  see if what the results are.

-Original Message-
From: waivic [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 4:18 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] UOJ and value-mark and field-mark

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. 

-- 
View this message in context:
http://www.nabble.com/UOJ-and-value-mark-and-field-mark-tp17612976p17612976.
h
tml
Sent from the U2 - Users mailing list archive at Nabble.com.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/



This email and any attached files are confidential and intended solely for
the intended recipient(s). If you are not the named recipient you should not
read, distribute, copy or alter this email. Any views or opinions expressed
in this email are those of the author and do not represent those of the Uni
Coop Bookshop company. Warning: Although precautions have been taken to make
sure no viruses are present in this email, the company cannot accept
responsibility for any loss or damage that arise from the use of this email
or attachments.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] UOJ and value-mark and field-mark

2008-06-07 Thread Anthony Grant
- Original Message -
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
To: u2-users@listserver.u2ug.org 
Sent: Sun Jun 08 00:35:12 2008
Subject: RE: [U2] UOJ and value-mark and field-mark

Change the @FM to @AM  see if what the results are.

-Original Message-
From: waivic [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 4:18 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] UOJ and value-mark and field-mark

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. 

-- 
View this message in context:
http://www.nabble.com/UOJ-and-value-mark-and-field-mark-tp17612976p17612976.h
tml
Sent from the U2 - Users mailing list archive at Nabble.com.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/



This email and any attached files are confidential and intended solely for the 
intended recipient(s). If you are not the named recipient you should not read, 
distribute, copy or alter this email. Any views or opinions expressed in this 
email are those of the author and do not represent those of the Uni Coop 
Bookshop company. Warning: Although precautions have been taken to make sure no 
viruses are present in this email, the company cannot accept responsibility for 
any loss or damage that arise from the use of this email or attachments.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] UOJ and value-mark and field-mark

2008-06-07 Thread Jeff Powell
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
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UOJ and value-mark and field-mark

2008-06-07 Thread Kathleené M Hunter
Change the @FM to @AM  see if what the results are.

-Original Message-
From: waivic [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 4:18 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] UOJ and value-mark and field-mark

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. 

-- 
View this message in context: 
http://www.nabble.com/UOJ-and-value-mark-and-field-mark-tp17612976p17612976.html
Sent from the U2 - Users mailing list archive at Nabble.com.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/