|
Just wanted to clarify a few things from previous posts on this subject: >>This expression substitutes the actual number of data records in a database file; and has several cases where 00000000 may be substituted. They are: The file does not exist. The file does not have any members. The file is allocated exclusively to another job. The file is a job (RETAIN-J) file. << Just to make this clear, these cases refer to the file that you're getting the number of records from, _not_ the file you're trying to create. >>blah! i always hated it when someone did that at our shop, it invited trouble! (used the records-?F'A stuff). If you change the A to an S, it is the allocated size, rather than the actual size.<< Unfortunately, the use of ?F'S,xxxx' has the potential to return the number of BLOCKS (not records), it depends on how the file was created. On the S/36, you could create a file specifying an initial size of either blocks or records. For Stephanie's knowledge, is this still an issue with the S/36 environment on the AS/400? This is why I always used ?F'A,xxxx'. Depending on the application, I would either test the value to decide whether to run a program: // IF ?F'A,xxxx'? = 0 GOTO BYPASS or I would evaluate it to a parameter and add 1 to it (an example would be to print an "empty" exception report; no exceptions, but still want to print report stating so): // EVAL P64=?F'A,xxxx'?+1 then, // LOAD ABC123 // FILE NAME-INPUT,LABEL-XXXX // FILE NAME-OUTPUT,LABEL-ZZZZ,RECORDS-?64? // RUN Boy, am I glad those days are over! +--- | 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-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.