× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: asdbget: character set
  • From: "Jason M. Felice" <jasonf@xxxxxxxxxxxxxx>
  • Date: Fri, 18 Feb 2000 17:18:01 -0500

On Fri, Feb 18, 2000 at 12:42:29PM -0500, Sean Porterfield wrote:
> I had another thought which may or may not be correct.

That pretty much describes all thoughts.

> 
> The -m option specifies the format of the AS/400 data, right?  Or is it
> the format that we want it converted to?

Format of AS/400 data.

> 
> I've been assuming the former.  If so, can we use the DSPFFD field that
> has the CCSID?  Should be easier than having to specify on the command
> line (especially since some of my files seem to have a different
> CCSID...)  On our AS/400 at V4R2, I have:
> 
> Field Level Information
>                Data        Field  Buffer    Buffer        Field
> Column
>     Field      Type       Length  Length  Position        Usage
> Heading
> 
>     WHCSID     PACKED       5  0       3       492        Both     CCSID
> 
>       Field text  . . . . . . . . . . . . . . . :  Coded Character set
> Identifier
> 

I've already thought about this and I want to do it eventually.  Time is
a factor right now, though, so I'm just doing oddball features that would
take me more time to figure out how to remind myself later than I need to
do them ;)

Maybe next release.  Certainly the next release will put the character
encoding in the XML file, but this means we have to add this info to the
transmaps table.  (Not a big deal)  I also have to wonder about whether
you can encode XML in weird character sets like this - like ones that don't
have enough of the characters needed for XML markup.  Do we have to do UTF8
here?  Or do all the iso-8859-* fonts have ascii as the lower 127 characters?

I need a month vacation so that I can screw around with researching
internationalization, character sets, XML, DRDA... fun stuff!

> 
> Next, I wonder how useful is the buffer lengh on a packed field?  We're
> converting to integers which means the length of our data isn't going to
> be the buffer length.  If it's a 'P' field, shouldn't we use the field
> length instead?

The conversion should work fine: so far as I understand, the mathematical
relationship between field size and representation length always holds,
so why bother parsing another field?

> 
> Finally, (off topic a bit) any easy way to define an SQL field type
> based on the buffer length or field length?  I have a lot of files with
> a lot of fields, so it would be a nightmare to create all the tables
> manually.  I tried dds2sql on the DDS of the file, but that was a
> disaster.

I'm confused.  You're trying to asdbget |asdb2tab | ????  Are you trying
to use as4002unix?  Where are you trying to get this data to?

You should be able to copy asdb2tab and hack it so that it creates SQL instead
of tab-delimited file.

> 
> Thanks.
> Sean Porterfield

-Jay
+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to LINUX5250@midrange.com.
| To subscribe to this list send email to LINUX5250-SUB@midrange.com.
| To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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.