IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JES datasets IO Error


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
@shim

New User


Joined: 28 Oct 2021
Posts: 10
Location: India

PostPosted: Thu Aug 22, 2024 6:25 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Thu Aug 22, 2024 8:01 pm
Reply with quote

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
View user's profile Send private message
@shim

New User


Joined: 28 Oct 2021
Posts: 10
Location: India

PostPosted: Thu Aug 22, 2024 8:24 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Thu Aug 22, 2024 9:50 pm
Reply with quote

@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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts IEW2315E 1369 Link error All Other Mainframe Topics 3
No new posts Help on IMS -API URL migrating from P... IMS DB/DC 1
No new posts Error to invoke MPP program through B... IMS DB/DC 3
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts PKZIP error ZPFM121E and ZPCE009E JCL & VSAM 6
Search our Forums:

Back to Top