One possible approach is to open a DCB with LRECL=0 in assembler and see what you get. That is the result of the merge of what is in the DSCB + what is in the allocation (JCL or SVC 99). It is probably the simplest, best picture.
Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Charles Mills Sent: Saturday, November 28, 2015 12:08 PM To: [email protected] Subject: Re: Lrecl I don't know the full answer to your question for certain but I do know that RDJFCB will not generally give you the true LRECL of a dataset. I believe it will only give you whatever LRECL is coded in the JCL (or, presumably, the equivalent SVC 99) if any. So if the dataset is recorded with an LRECL 300, then if the JCL user codes DD ...,LRECL=121,... then the JFCB LRECL will contain 121. If the user omits the LRECL from the DD then it will contain 0. There is no mapping from dataset to JFCB, at least not before the OPEN. I am trying to recall if SVC 99 info retrieval will do this. I think perhaps you have to use OBTAIN and CAMLST to read the VTOC DSCB. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Scott Ford Sent: Saturday, November 28, 2015 11:51 AM To: [email protected] Subject: Lrecl All: Our STC use several files and I want to verify that the files have the correct logical record length. The STCs are written LE Cobol. I would like to know before I open the file if the file that is created or allocated is correct in record length. For example, if the Logical Record Length is 121 as defined in the program tries to open a file with a LRECL 300 bytes. Can i do the following ? 1. Call a Assembler subroutine using RDJFCB and determine the lrecl on the volume for the dataset and allocation ? 2. If the lrecl i want to pass back a RTNCD in R15 and then then have Cobol fail .... ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
