Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using DDM Files

Status
Not open for further replies.

xiancmc

Programmer
Jul 11, 2006
6
CN
I'm using DDM files to access other PF files from other System, via CPYF everytime I run my program. This method slows down my program since the PF files have a large number of records.

Are there any alternative approach in using the DDM files to make my processing faster?

Many Thanks.
 
Try adding FROMRCD(1) to your CPYF. This is faster because CPYF doen't have to deal with access paths; it just copies record-for-record:

Code:
            CPYF       FROMFILE(&ODLBNM/&ODOBNM) +                  
                         TOFILE(&TARGETLIB/&ODOBNM) FROMMBR(*ALL) + 
                         TOMBR(*FROMMBR) MBROPT(*REPLACE) +         
                         CRTFILE(*YES) [COLOR=red]FROMRCD(1)[/color] FMTOPT(*MAP *DROP)
            MONMSG     MSGID(CPF0000) EXEC(DO)                      
            CLRPFM     FILE(&TARGETLIB/&ODOBNM)                     
            MONMSG     MSGID(CPF0000)                               
            ENDDO

Solum potestis prohibere ignes silvarum.

 
Thank you very much. Other than CPYF, are there any other method to access DDM files like creating LF if that's is possible?
 
Logical files? I don't think that will help.

Well, in my experience, you can ditch the DDM files altogether and just FTP from the remote system to yours. FTP can be much faster. When you are transferring native AS/400 files, you need to transfer them as BINARY or EBCDIC. This will preserve packed fields. The files have to be the same on both systems.

FTP as batch job

Solum potestis prohibere ignes silvarum.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top