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



Mike,

I can't exactly answer your question, but I've found it easier to copy the
stream file to a flat file, then copy the flat file to the ext def physical
with *NOCHK.
the reason is, that If the layout changes, you won't have to change 2

like this:

first, create the flat file (VIPICOD in the example) with a length of at
least the size of the input file (longer if you ever expect it to change,
because it doesn't matter).

then:

CPYFRMIMPF FROMSTMF(&FRMPATH) TOFILE(VIPICOD) +
              MBROPT(*REPLACE) RCDDLM(*ALL) +
              STRDLM(*NONE) FLDDLM(*TAB) +
              RPLNULLVAL(*FLDDFT)

and then copy it to your file (VIPICOD1 in the example):

CPYF       FROMFILE(VIPICOD) TOFILE(VIPICOD1) +
             MBROPT(*REPLACE) FMTOPT(*NOCHK)

since there are no tabs in the stream file, the first copy treats each
record like 1 field, copying into the flat file.

the second copy overlays your fields properly.

hth,

Rick




                                                                                
                                                       
                      "Smith, Mike"                                             
                                                       
                      <Mike_Smith@RGCResou        To:       
<midrange-l@xxxxxxxxxxxx>                                                  
                      rces.com>                   cc:                           
                                                       
                      Sent by:                    Subject:  CPYFRMIMPF          
                                                       
                      midrange-l-bounces@m                                      
                                                       
                      idrange.com                                               
                                                       
                                                                                
                                                       
                                                                                
                                                       
                      05/28/2004 09:54 AM                                       
                                                       
                      Please respond to                                         
                                                       
                      Midrange Systems                                          
                                                       
                      Technical Discussion                                      
                                                       
                                                                                
                                                       




I'm trying to use this to copy a text file in the IFS to a physical
file.
The data is fixed format.  The command tells me I need a field reference
file.  According to the info center it should look something like this

- (FROMFILE) field start and end positions.
 */ -FILE MYLIB/MYFILE */
 field1 1 12 13
 field2 14 24 0
 field3 25 55 56
 field4 78 89 90
 field5 100 109 0
 field6 110 119 120
 field7 121 221 0
 *END

My question is how  do I define somethine like this.  Do I just create a
text member ?


Michael Smith
iSeries.mySeries.

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