|
Hi Joe, The INFDS has a fixed set of information followed by file-dependent information. You can find the format of the OPEN-FEEDBACK and I-O-FEEDBACK data areas in appendix A.2 of the Data Management Guide (in InfoCenter). The fixed portion of the I-O-FEEDBACK area is 144 bytes. The length of the file-dependent portion depends on the type of file :) - 80 for ICF and display files, 38 for printer files, variable for database files (depends on keys and null value fields). Don't know of a syntax in COBOL to determine the length of a group field. If you compile your program with OPTION(*MAP), the compile listing will include a map of the data division which includes the length of each field. Moving fields works from left-to-right so your move of a 100-character FIELDA to a 75-character FIELDB will move the first 75 characters of FIELDA into FIELDB. Moving a group field also ignores the field types of the individual subfields so watch out for your numeric fields! Hope this helps! Richard -----Original Message----- From: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx]On Behalf Of Joe Pluta Sent: Thursday, April 17, 2003 10:49 AM To: COBOL Programming on the iSeries/AS400 Subject: ACCEPT and the INFDS Hi everyone! I'm back with newbie question number 736: the file informational data structure. I've gotten to the point where I think I understand that you have to do an ACCEPT which transfers the contents of the INFDS to a working storage buffer. My question is this: is the layout of that working storage buffer fixed, or are the names significant? The one I've seen has a bunch of filler fields, which leads me to think that the names are not significant, but that the positions are. Even more newbie, what's the length of the data structure? Is it like RPG, where the longer you specify the more fields you get? Or is there a fixed length it needs to be? And as a simple corollary, is there a syntax in COBOL that will get me the length of a field that has subfields? And finally, in a blinding burst of newbieness, say I have two 01-level fields, both with lots of 05 and 10 subfields. FIELDA is 100 characters, FIELDB is 75. If I MOVE FIELDA TO FIELDB, does this move the first 75 bytes (positions 1-75) of FIELDA to FIELDB, or the last 75 (positions 26-100)? I'm pretty sure its the former, but this whole thing has confused me no end. Okay, now. Stop laughing. Get off the floor. Joe
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.