ISeries Data Transfer VS CPYTOIMPF
35 pts.
0
Q:
ISeries Data Transfer VS CPYTOIMPF
When transfering data from the AS400 to a PC as a text file using the iSeries transfer, the numeric values are right justified and this is what I need. I am trying to setup a CL that will do this with out any user interaction. But whenever I try to do this on the AS400 using CPYTOIMPF or CPYTOSTMF the numeric values are left justified. How can I get around this issue without having the user upload these files every week?

Thanks Dave
ASKED: Jul 20 2009  5:29 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
24610 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
StreetD

I'm not sure what your client access download looks like - perhaps a few lines would help me
But I'm guessing you want a fixed record length - no field delimiters and blanks on numeric.
So you want to change your CPYTOIMPF as follows.

CPYTOIMPF
DTAFMT *FIXED
NUMFLDPAD *blank

Phil

StreetD

So .. try
NUMFLDPAD *blank
That should do what you want .. leading blanks on numeric fields.

Phil

-----------------------
StreetD
Did setting the NumFldPad value to it?
Phil
------------------------
****************************************************

Thanks for the feedback - NUMFLDPAD is a v6r1 feature
And now we know why it was added.

Until your upgrade ...
1. If your program is creating the download file
1.1. Change the numeric fields to char
1.2. Use appropriate %EDITC to right justify the data.
2. Else
Write a small program to read each record from the download file
and write it to a second file with char fields instead on numeric fields
using %EDITC to right justify the data.

Then USE CPYTOIMPF to copy the data from the new file.

Phil

*****************************************************
Dave
That's great
Phil
Last Answered: Jul 23 2009  4:17 PM GMT by Philpl1jb   24610 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

StreetD   35 pts.  |   Jul 20 2009  7:34PM GMT

Phil,

This is the CPYTOIMPF I am using,

CPYTOIMPF FROMFILE(LIB/FILE &MLNAME) +
TOSTMF(’/payfiles/PAY.TXT’) +
MBROPT(*REPLACE) STMFCODPAG(*STMF) +
RCDDLM(*CRLF) DTAFMT(*FIXED) NULLIND(*NO)

As for the client access it is the IBM iSeries access for Windows

Just a transfer of a file member to a ASCII text file.

 

StreetD   35 pts.  |   Jul 21 2009  2:56PM GMT

Phil,

My CPYTOIMPF does not have the keyword NUMFLDPAD.

Dave

 

StreetD   35 pts.  |   Jul 23 2009  2:51PM GMT

Phil,

Thank you for your help. We will be going the V6R1 next week. We have V6R1 on our one system, so I was able to try the new CPYTOIMPF using the keyword NUMFLDPAD *BLANK. The file is in the correct format for our client.

Dave

 
0