View previous topic :: View next topic
|
Author |
Message |
GauravKudesiya Warnings : 1 New User
Joined: 11 Oct 2008 Posts: 74 Location: Chicago, IL
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You cannot use OPEN EXTEND with PDS members |
|
Back to top |
|
|
GauravKudesiya Warnings : 1 New User
Joined: 11 Oct 2008 Posts: 74 Location: Chicago, IL
|
|
|
|
Thanks Erico Sorichetti for early reply.
But how to implement append records in member of PDS??
Thanks. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
GauravKudesiya Warnings : 1 New User
Joined: 11 Oct 2008 Posts: 74 Location: Chicago, IL
|
|
|
|
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 |
|
|
GauravKudesiya Warnings : 1 New User
Joined: 11 Oct 2008 Posts: 74 Location: Chicago, IL
|
|
|
|
@ 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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|