× 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.



Someone suggested this on another thread.  I've played with it a bit and it
seems to work well.

Create a second version of the AS/400 database file with the same field
names, but with the packed fields defined as signed.  You can FTP directly
to the AS/400 file without going through the IFS or any native flat files.
Then copy from the file with unpacked fields to the file with packed fields
using CPYF FMTOPT(*MAP).

If you're unsure of the layout for the file on VMS just populate the AS/400
file with the unpacked fields and FTP it to the VAX.

The only problem I had was with numeric fields at the end of a record.
Dropping in a bogus character X at the end of each record and a
corresponding 1A field at the end of the interim file on the AS/400 cleaned
this up.  The copy to the final file required FMTOPT(*MAP *DROP).  There
might be a more graceful way of accomplishing this.

-Jim

James P. Damato
Manager - Technical Administration
Dollar General Corporation
<mailto:jdamato@dollargeneral.com>


----- Original Message -----
From: "Uros Davidovic" <Uros_Davidovic@compaid.com>
To: "'Midrange Systems Technical Discussion'" <midrange-l@midrange.com>
Sent: Tuesday, January 07, 2003 7:52 PM
Subject: VAX to AS/400 packed field conversion problem


> Hey gang, trying to transfer files from a VAX system to the 400. We
> currently have a process in place that converts the packed fields on the
> VAX to signed numerics, then we FTP them ASCII and finally, copy from
> the flat file on the 400 to the database on the 400 that contains packed
> fields. Is there a simpler way to do this, I was playing around with the
> *TBL option on the CPYFRMSTMF (trying to copy to IFS as is), and trying
> to research what character set ID I would need to convert to (is VAX
> ascii?), but this does not seem to work?
>
> Any ideas how to simplify?
>
> Thanks,
> Uros

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-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.