|
-->From: D.BALE@handleman.com -->The help for CPYF seems to -->imply that a PHYSICAL file can have multiple record formats. True, it is not very clear, but it seems correct. On V4R4 the Additional Parameters read "Record format of logical file . *ONLY Name, *ONLY, *ALL" -->something? I am already familiar with logical files having mulitple record -->formats. Okay -->Can someone educate me how the RCDFMT parameter on the CPYF command is used on -->a physical file? The simple answer: I don't think anyone uses it much for PF copies. The detailed answer (off the cuff and hopefully mistake free): The default--> *ONLY ,will work anytime with the physical. Excluding shops that name their physicals and logicals "anything", the only good use I can think of is: for clarity. If you explicitly name the RCDFMT in your code then the command will crash and burn of a co-worker ruins your file scheme or boo-boo's. Example: 10 libraries all containing 1 copy of SALES, in the naming form of STORE001 STORE002, and so on. But the master format name is STORESLSR and the master file name is STORESLS Your control program may be clearer to another programmer with explicit naming, especially if it not the same name as the file. I think erverone puts an "R" after the file name when defining the format. If your files are dynamic and coming from other systems, it could be smart to think though this use of the RCDFMT paramater also. --> Is this something that would be used for a non-described, -->multi-format file (i.e., S/36-style Header & Detail formats combined into one -->file)? No. As far as the AS/400 is concerned, there is no such thing as a multi-format physical. That is the purpose of normalization. If you can't convert S/36 to native files that make better sense to you (I'm guessing thats not an option), you have at least 2 choices. 1) Logically seperated in the program, as it was in the beginning. (I think thats what you are trying to get around) Look at S/36 mode's COPYDATA command for a view of what I think you are trying to do. You can "effectively" copy a format with this command, that is all there was in those days. With AS/400 tools, you can create queries that do similiar filtering, only for investigation of problems I would suggest. A more permanent selection can be done by building separate logical files upon the physical, but you will only be able to do this in the logical by your criteria for selection being the index of the non-native "Indexed" physical file. The remainder of the record is one field. If you build logicals using the S/36 BLDINDEX command the native CPYF FROMKEY/TOKEY works great against the keys you build, and are named K00001,K00002,K00003. I hope this helps. MarkVilla@knology.net +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.