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



Y'all - just got another idea - use an SQL view. This is an extension of the idea of using an LF that converts the packed field to zoned.

I created a PF with a single packed 5,0 field. I added 2 records to it, with values of 5 & -4.

A..........T.Name++++++RLen++TDpB.
A          R PACKEDR
A            PCKFLD         5P 2

Then I created an LF to make the packed field look like a zoned field

A..........T.Name++++++.Len++TDpB......Functions++++++
A          R PACKEDR                   PFILE(PACKEDPF)
A            PCKFLD          S

I started an FTP session from Windows to the iSeries.

     get packedpf packedpf.txt

resulted in the expected garbage.

     get zonedlf zonedlf.txt

gets closer, but the sign is garbage but predictable - and no decimal points

00500
0040}

Then I created a view

create view somelib/charview (pckfld) as select char(pckfld) from packedpf

     get charview charview.txt

results in

5.00
-4.00

HOORAY!

It still is not fixed-length or delimited but the latter could be accomplished easily in the SELECT statement of the view. The advantage over CPYTOIMPF is that you don't need to somehow execute the copy routine.

HTH
Vern

At 12:26 PM 1/10/2005, you wrote:
It's not a fixable issue. All versions of OS/400 convert between EBCDIC
and ASCII (automatically), but none will convert a packed decimal field
to zoned decimal. You can do a couple of things:

1. Create a file with the same fields but change the packed fields to
zoned fields, and then do a CPYF and FTP the copied file. This is good
if you have the DDS.
2. Use the CPYTOSTMF command.
3. Use the CPYTOIMPF command.

> -------- Original Message --------
> Subject: FTP Issue
> From: "Matthew Gross" <prrgg1@xxxxxxxxxxxxx>
> Date: Mon, January 10, 2005 1:05 pm
> To: "Post AS-400 System Questions" <midrange-l@xxxxxxxxxxxx>
>
> I am working at a client who has an AS/400 with release 4.x of the OS/400 operating system.
>
> The problem we are experiancing is with FTP on the 400. It appears that all packed decimal fields send special characters to the receiving system. The receiving system is running UNIX.
>
> >From what I gather at this level of the OS (4.x) there is no way to convert EBCIDIC to ASCII and then send it via FTP.
>
> I understand that in later releases of the AS/400 Operating System this problem with FTP is fixed.
>
> Is this True???
> What is the earliest level of the AS/400 OS that this issue is fixed?
>
> Any help would be greatly appreciated.
>
> M Gross
>
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.