In den F-Bestimmungen kannst du die Formate der DSPF ebenso "qualified" definieren.
Der Code ist dann allerdings etwas aufwendiger, erleichtert aber das Leben:
der Nachteil ist sicherlich, dass man bei allen Read/Write/Exfmt sowohl den Datei.Format-Namen als auch die DS angeben muss.Code:* file1 has formats HDR, INFO, ERR. * file2 has format INFO. * The QUALIFIED keyword is used for both files, making it * unnecessary to rename one of the "INFO" formats. * Note that the record format names are not qualified when * specified in keywords of the File specification. Ffile1 if e disk qualified F ignore(hdr) F rename(err:errorRec) Ffile2 o e disk qualified * The record formats must be qualified on all specifications other * than the File specification for the file. D ds1 ds likerec(file1.info : *input) D errDs ds likerec(file1.errorRec : *input) D ds2 ds likerec(file2.info : *output) /free read file1.info ds1; eval-corr ds2 = ds1; write file2.info ds2; read file1.errorRec errDs; Figure 116. Example of the QUALIFIED keyword
Zusätzlich bedarf es eines "eval-corr" für die Übertragung zwischen den DS.
![[NEWSboard IBMi Forum]](images/duke/nblogo.gif)



Mit Zitat antworten
Bookmarks