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



I have read all through the archives about this but still am unsure of 
answer.

I on v5r1. 

This is my CPYTOIMPF command in RPGIV:

 * 
C                   Eval      Qcmd = 'CPYTOIMPF FROMFILE('+ 
C                             %trim(DRKY) + 
C                             ') TOSTMF(''QOpenSys/forcastx/'+ 
C                             %trim(DRKY) + 
C                             '.txt'') MBROPT(*REPLACE) STMFC'+ 
C                             'ODPAG(*PCASCII) RCDDLM(*CR) D'+ 
C                             'TAFMT(*DLM) STRDLM(*NONE) FLD'+ 
C                             'DLM(X''A1'')' 
 * 

Sub in FXC for DRKY variable.

Here is PF = FXC

 A          R FXCR 
 A* 
 A            FXABAN8       60          VARLEN 
 A            FXABALPH      60          VARLEN 
 A            FXABAC02      60          VARLEN 
 A* 
 A          K FXABAN8 

For some reason after reading I thought that this would create the .txt 
file with 3 columns and the length of each field would be determined by 
the largest value found in a field for all records. 

So you would end up with something like this after copy.

12345~1111111111~123  ~
123     ~222222         ~1       ~
1234   ~33333333    ~1234~

Where it strips out blanks down to largest value.  I'm I doing something 
wrong; because it still puts out fields with length of 60A after copy. Or 
do I need to strip out blanks myself and build file file? Or get something 
like the DBG/400 command.

Thanks 
Bill Hopkins

Questions,Comments, or "Knocks in the Head" welcomed! 


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.