View previous topic :: View next topic
|
Author |
Message |
@shim
New User
Joined: 28 Oct 2021 Posts: 10 Location: India
|
|
|
|
Hi Everyone,
I am having a strange issue while reading a JES dataset through a C program specifically the JESYSMSG dataset. The RECFM attribute of JESYSMSG is VA (no blocked) with LRECL 137. So ideally this should contain maximum 133 Bytes. But in the spool, when I browse the dataset with SB, and I see there are additional byte in column 134. And my program is failing exactly in that record. If there are no such bytes beyond 133, the program goes fine.
I am fopen(ing) the file as (rb, type=record, recfm=u) and fread(ing) as (buffer, 1, 32752, fp). The ferror() get set while reading this type of record. My question is there any way we can avoid this I/O error any advice / thoughts would be helpful. Also, if I do a XDC to copy the JES file with recfm 255, I see the LRECL of that record in question is 134 from the RDW on the disk file.
Any suggestion would be much appreciated. Thank you !! |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2145 Location: USA
|
|
|
|
Where the info about LRECL=137 comes from?
SDSF is showing max JESYSMSG record 134 bytes (without RDW). So, it must be LRECL=138 |
|
Back to top |
|
|
@shim
New User
Joined: 28 Oct 2021 Posts: 10 Location: India
|
|
|
|
sergeyken wrote: |
Where the info about LRECL=137 comes from?
SDSF is showing max JESYSMSG record 134 bytes (without RDW). So, it must be LRECL=138 |
Those records get generated from some 3rd party products in JESYSMSG. We are already in touch with IBM support how come JES is even displaying the last byte beyond 133, in that case it should be 138 as the LRECL. We are yet to get any response on that aspect. This mismatch probably is setting the I/O error.
Since XDC is able to read that JES dataset, but fread() can't, that is where I was looking for any advice, in any way can we read that record with some tricks or till 133 Bytes for that record. Thanks again for any help on this !! |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2145 Location: USA
|
|
|
|
@shim wrote: |
Since XDC is able to read that JES dataset, but fread() can't, that is where I was looking for any advice, in any way can we read that record with some tricks or till 133 Bytes for that record. Thanks again for any help on this !! |
Where exactly is your LRECL=137 specified?
Just replace it, or override its value - either in your // DD LRECL=138, or in your dynamic file allocation function, - to the correct value: LRECL=138
I do not see any serious issue here. |
|
Back to top |
|
|
|