You have actually raised 3 issues here.
- Specifying data set attributes using the TSO ALLOCATE command.
- Using the JFCB
- "Trapping" S013 ABENDS
Specifying data set attributes using the TSO ALLOCATE command.The BLOCK (used to specify data set average physical record size) and BLKSIZE (used to set the DCB block size) parameters conflict. Don't mix them if possible. The ALLOCATE command effectively stores the BLOCK parameter as a BLKSIZE. I don't really know, for sure, what happens if both are specified.
Using the JFCBI'm not sure I understand your comment about using the JFCB to determine if a data set has been modified. For your purpose I would use the JFCB as the source for a data set name and volume serial to be used with the OBTAIN macro to get the format 1 DSCB for the data set, and then to check if the data set has been modified. Obviously this won't work for tape.
"Trapping" S013 ABENDSYou can't "trap" S013 ABENDs in a useful fashion. What you can do is use the DCB open exit to obtain the RECFM, LRECL and BLKSIZE after OPEN has merged the DCB, JFCB and data set label, and correct, if necessary, these parameters. Before system determined BLKSIZE I had elaborate exits to do the equivalent of system determined BLKSIZE. There is one problen with this approach: replacement values for the RECFM, LRECL and BLKSIZE are reversed merged into the JFCB, which isn't always desirable. If you are going to copy DCB attributes from another DCB, the open exit is a good place to do this. I would set the RECFM and LRECL before the OPEN, and use the open exit to deal with the BLKSIZE.
As Mr. Scherrer says, hope this helps.