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

File Handling Error SB14 R=04


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
GauravKudesiya
Warnings : 1

New User


Joined: 11 Oct 2008
Posts: 74
Location: Chicago, IL

PostPosted: Mon Sep 14, 2009 7:40 pm
Reply with quote

Hello,
I am facing some issues while closing an sequential file

Code:
//RULE     DD  DSN=T0084GK.AA.DECMP(ABC),DISP=SHR


Code:
FILE-CONTROL. 
SELECT RULE   ASSIGN TO UT-S-RULE       
FILE STATUS IS FS3.       
.
.
.
DATA DIVISION.     
FILE SECTION.                   
FD   RULE                                 
     RECORDING MODE IS V                   
     LABEL RECORDS ARE STANDARD           
     BLOCK CONTAINS 0 RECORDS             
     DATA RECORD IS RUL-REC.               
01   RUL-REC PIC X(251).                   
.
.
PROCEDURE DIVISION.   
.
.
OPEN EXTEND RULE. 
.
.
MOVE NEW-RUL TO RUL-REC.         
WRITE RUL-REC.
.
.
CLOSE RULE.   



While Closing file i am getting following error.

Code:
CEE35I is a severity or class 4 condition.
The operating system has generated the following message:       
   CEE3250C The system or user abend SB14  R=00000004 was issued.



AND IDIREPRT of SDSF

Code:
A system abend B14 reason code X'4' occurred in module IGZEQOC at offset       
X'1664'.                                                                       
                                                                               
There was an unsuccessful CLOSE of file RULE in module ADSO783Z program ADSO783
at offset X'8B0'.The file status code was 90which indicates:               
                                                                               
Implementor-defined condition.
                                                                               
The data set name was T0084GK.AA.DECMP(ABC).




SYSOUT Shows:
Code:
FILE STATUS RULE:00                                                             
CEE3250C The system or user abend SB14  R=00000004 was issued.                 
         From compile unit ADSO783Z at entry point ADSO783Z at statement 128 at compile unit offset +000008B0 at entry offset +000008B0 at address 1B200AD8.



Thanks In Advance:
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 14, 2009 7:52 pm
Reply with quote

You cannot use OPEN EXTEND with PDS members
Back to top
View user's profile Send private message
GauravKudesiya
Warnings : 1

New User


Joined: 11 Oct 2008
Posts: 74
Location: Chicago, IL

PostPosted: Mon Sep 14, 2009 7:55 pm
Reply with quote

Thanks Erico Sorichetti for early reply.
But how to implement append records in member of PDS??

Thanks.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Sep 14, 2009 7:57 pm
Reply with quote

Wasn't this whole issue already covered here:

www.ibmmainframes.com/viewtopic.php?t=43791
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Sep 14, 2009 8:04 pm
Reply with quote

The Messages and Codes manual for IEC217E states for reason code 4:
Quote:
04
A duplicate name was found in the directory of a partitioned data set. The CLOSE routine attempted to add a member name to the directory using the STOW macro instruction, but a code of 4 was returned, indicating that the member already exists. Specify a different member name, or remove the old member name using the IEHPROGM utility, or specify DISP=OLD on the DD statement.
Guarav, this should tell you that what you are attempting cannot be done in the way you are doing it. Your choices are:
1) use DISP=OLD and forget the idea of appending to a PDS member
2) create a sequential file copy of the PDS member, append to the sequential file, then copy back (DISP=OLD) to the PDS
Back to top
View user's profile Send private message
GauravKudesiya
Warnings : 1

New User


Joined: 11 Oct 2008
Posts: 74
Location: Chicago, IL

PostPosted: Mon Sep 14, 2009 8:08 pm
Reply with quote

I am sorry, the issue that post is just putting light on writing in a member of PDS,
I need to append new record in that member, with leaving previous records as it is.

when i am opening the file RULE in
1) OUTPUT
it is writing the desired record in file but deletes the previous data.
2) I-O (and read till the last record then writing)
it overwrites the last record.
3) EXTEND
It is throing the above error.

It is clear now that i cant use EXTEND in Member of PDS.
But it is still a mystry to append a new record in a member of PDS.

Thanks.
Back to top
View user's profile Send private message
GauravKudesiya
Warnings : 1

New User


Joined: 11 Oct 2008
Posts: 74
Location: Chicago, IL

PostPosted: Mon Sep 14, 2009 8:12 pm
Reply with quote

@ Robert Sample.
I was just looking for some good way to implement this.
looks like this is the only option left with me now.
Thanks Robert for sharing the above knowledge.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Sep 14, 2009 8:18 pm
Reply with quote

Quote:
I was just looking for some good way to implement this.
There is no way to do it -- you cannot append to a PDS member. Period. You can replace the entire member, but you cannot append to it. If you think about the physical structure of a PDS, you will understand why the system does not allow you to append.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top