|
This is from the online manual: The POST operation puts information in an INFDS (file information data structure). This information contains the following: 1) File Feedback Information specific to RPG I/O for the file 2) Open Feedback Information for the file 3) Input/Output Feedback Information and Device Dependent Feedback Information for the file OR Get Attribute Information In factor 1, you can specify a program device name to get information about that specific program device. If you specify a program device in factor 1, the file must be defined as a WORKSTN file. If factor 1 does contain a program device, then the INFDS will contain Get Attribute Information following the Open Feedback Information. Use either a character field of length 10 or less, a character literal, or a character named constant. If you leave factor 1 blank, then the INFDS will contain Input/Output Feedback Information and Device Dependent Feedback Information following the Open Feedback Information. In factor 2, specify the name of a file. Information for this file is posted in the INFDS associated with this file. If you specify a file in factor 2, you can leave the result field blank. The INFDS associated with this file using the INFDS keyword in the file specification will be used. You can specify a file in factor 2 and its associated INFDS in the result field. If you leave factor 2 blank, you must specify the data structure name that has been used in the INFDS keyword for the file specification in the result field; information from the associated file in the file specification will be posted. To handle POST exceptions (file status codes greater than 1000), either the operation code extender 'E' or an error indicator ER can be specified, but not both. For more information on error handling, see "File Exception/Errors" in topic 1.5.1. Even when a POST operation code is not processed, its existence in your program can affect the way the RPG IV language operates. Usually, the INFDS is updated at each input and output operation or block of operations. However, if anywhere in your program, you have specified a POST operation with factor 1 blank, then RPG IV updates the I/O Feedback Information area and the Device Dependent Feedback Information area in the INFDS of any file only when you process a POST operation for that file. The File Dependent Information in the INFDS is updated on all Input/Output operations. If you have opened a file for multiple-member processing, the Open Feedback Information in the INFDS will be updated when an input operation (READ, READP, READE READPE) causes a new member to be opened. Note that DUMP retrieves its information directly from the Open Data Path and not from the INFDS, so the file information sections of the DUMP do not depend on POST. If a program has no POST operation code, or if it has only POST operation codes with factor 1 specified, the Input/Output Feedback and Device Dependent Feedback section is updated with each input/output operation or block of operations. If RPG is blocking records, most of the information in the INFDS will be valid only for the last complete block of records processed. When doing blocked input, from a data base file, RPG will update the relative record number and key information in the INFDS for each read, not just the last block of records processed. If you require more accurate information, do not use record blocking. See "File Information Data Structure" in topic 1.5.1.1 for more information on record blocking. If you do not require feedback information after every input/output operation, you may be able to improve performance by using the POST operation only when you require the feedback information. When a POST operation is processed, the associated file must be open. If you specify a program device on the POST operation, it does not have to be acquired by the file. Regards, Peter Vidal Pall Aeropower Corp. / SR Programmer Analyst www.pall.com / Peter_Vidal@Pall.com 727-539-8448, x2414
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.