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



Jerry - I tried this on a V5R2 machine - same results. But because you changed it to a numeric, I tried FTP - that works. Just use ASCII mode, not BINARY.

I think this has been the problem with CPYTOIMPF - I would think *FIXED should honor the whole original data length - I think someone was thinking too hard - I mean, if I had the value 120061218 in one record and 020061218 in the other, they do not line up - so *FIXED is broken as far as I am concerned.

120061218
20061218

The FTP solution fails if you have packed or binary fields. One could use the data type override as you did, or use SQL to generate a temp file to FTP to the IFS.

V5R4 added parameters to CPYTOIMPF that keep leading blanks - but ignored for *FIXED format - could try *DLM with no separator.

HTH
Vern

At 11:48 AM 12/19/2006, you wrote:

It's signed numeric not packed.

J

0080.00      A            PHPRDT    R     S         REFFLD(PRDT)

Jerry DraperJerry Draper wrote:
> 0897.50      A            PRDT           9P 0
>                       030718
> 0897.60      A                                      TEXT('Processed
> Date')                   030718
> 0897.70      A                                      COLHDG('Processed'
>                       030718
> 0897.80      A                                             'Date')
>                       030718
> 0897.90      A                                      EDTWRD('     /  /
> ')                    030718
>
> ....4....
> 020061218
> FFFFFFFFF
> 020061218
>
> CPYTOIMPF FROMFILE(DBFDEV/UPI1INPT00) TOSTMF('/home/ss104/test1')
> MBROPT(*REPLACE) STMFCODPAG(*PCASCII) RCDDLM(*LF) DTAFMT(*FIXED)
>
> All records copied from file UPI1INPT00 in DBFDEV.
>
> result is:  20061218
> should be: 020061218
>
> Jerry
>
>
> Vernon Hamberg wrote:
>> Jerry - what are the various settings you are using? Where are you
>> seeing this drop off? Are these character fields with leading zeroes
>> in the original PF? Are you viewing in Excel?
>>
>> We need more info!!
>>
>> Thx
>> Vern
>>
>> At 07:30 PM 12/18/2006, you wrote:
>>
>>> I'm running a cpytoimpf and it is dropping leading zeros of numeric fields.
>>>
>>> How can this be controlled?
>>>
>>> I tried *STDASCII and *PCASCII to no avail.
>>>
>>> Jerry
>>>
>>> --
>>> Jerome Draper, Trilobyte Software Systems, since 1976
>>> iSeries, Network, and Connectivity Specialists -- iSeries, LAN/WAN/VPN
>>> Representing WinTronix, Synapse, Netopia, HiT, and others .....
>>> (415) 457-3431; www.trilosoft.com
>>>
>>> --
>>> 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.
>
>


--
Jerome Draper, Trilobyte Software Systems, since 1976
iSeries, Network, and Connectivity Specialists -- iSeries, LAN/WAN/VPN
Representing WinTronix, Synapse, Netopia, HiT, and others .....
(415) 457-3431; www.trilosoft.com

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