|
Hello:
This code:
> iconv_t cd;
>
> struct {
>
> char IBMCCSID[8];
>
> char CcsidNbr[5];
>
> char convAlt[3];
>
> char subAlt;
>
> char shiftStateAlt;
>
> char inputLenOpt;
>
> char errorOpt;
>
> char reserved[12];
>
> } fromCcsid;
>
> strncpy(&fromCcsid.IBMCCSID[0],"IBMCCSID",8);
>
> strncpy(&fromCcsid.CcsidNbr[0],"00037",5); // "00000" also does not
> work
> strncpy(&fromCcsid.convAlt[0],"000",3); // "102" also does not work
> either
> fromCcsid.subAlt = '0';
>
> fromCcsid.shiftStateAlt = '0';
>
> fromCcsid.inputLenOpt = '0';
>
> fromCcsid.errorOpt = '0'; // '1' does not work either
> memset((void *)&fromCcsid.reserved[0],0x00,12);
>
> struct {
>
> char IBMCCSID[8];
>
> char CcsidNbr[5];
>
> char reserved[19];
>
> } toCcsid;
>
> strncpy(&toCcsid.IBMCCSID[0],"IBMCCSID",8);
>
> strncpy(&toCcsid.CcsidNbr[0],"00850",5);
>
> memset((void *)&toCcsid.reserved[0],0x00,19);
>
> cd = iconv_open ((char *)&fromCcsid,(char *)&toCcsid);
>
> if(cd.return_value == -1){
generates the following error msg:
The value specified for the argument is not correct.
which is the text associated with errno. This is V5R2. I am trying to do ebcdic
to ascii translation.
I would much appreciate any ideas anyone might have.
Sincerely,
-Davis Yokana
As an Amazon Associate we earn from qualifying purchases.
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.