Hello guys I am reading a record from a dtaq passing an array
of alphanumeric, someone can tell me how to use the class AS400Array
in the set and get methods to manage an array of strings?

thank you very much Dario


private AS400Record record;

private static RecordFormat format = new RecordFormat();

static{


format.addFieldDescription(new ArrayFieldDescription(new

AS400Array(new AS400Text(1, 280), 3), "CICCIO2"));

}

public AS400MailDS() throws UnsupportedEncodingException {

super(500);

record = new AS400Record(format);

}

public AS400MailDS(byte[] contents) throws

UnsupportedEncodingException {

super(500);

record = new AS400Record(format, contents);

}


public void setAS400MailDS(byte[] AS400MailDS)

throws UnsupportedEncodingException{

record.setContents(AS400MailDS);

}

public byte[] getAS400MailDS(){

return record.getContents();

}


public String[] getCICCIO2() {

AS400Text[] ArrayS =(AS400Text[]) record.getField("CICCIO2");

for (int i = 0; i < ArrayS.length ; i++) {

....... non so

}

}

return String[] ......;

}


public void setCICCIO2(String[] CICCIO2) {

try {

record.setField("CICCIO", CICCIO2 );

} catch (UnsupportedEncodingException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.