Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

VSAM file error while rewriting

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Paul1983

New User


Joined: 08 Jul 2008
Posts: 37
Location: bangy

PostPosted: Thu Aug 21, 2008 2:19 pm    Post subject: VSAM file error while rewriting
Reply with quote

Hi,

I'm trying to rewrite a KSDS file with following attributes

File Type: KSDS
CI Size: 512
Key length: 12
Key location: 0
Record format: V
Average record length: 229
Maximum record length: 229

the FILE-CONTROL is as follows

SELECT PU1100-UPFILE ASSIGN UT19
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD DPU-KEY
FILE STATUS IS W120-FILE-STATUS.

where DPU-KEY = X(12)

FD PU1100-UPFILE
BLOCK CONTAINS 0 RECORDS
LABEL RECORDS ARE STANDARD.
01 DPU1100-UPFILE-REC PIC X(229).


OPEN I-O PU1100-UPFILE.


MOVE SPACES TO DPU-KEY.
START PU1100-UPFILE KEY GREATER THAN DPU-KEY.
READ 1100-UPFILE.


The above are the details of my program.But I'm getting compilation error as follows

A "RECORD KEY" CLAUSE WAS MISSING OR INVALID IN THE "SELECT" ENTRY FOR FILE "PU1100-UPFILE".


"RECORD KEY" OR "ALTERNATE RECORD KEY" "DPU-KEY" WAS NOT DEFINED WITHIN A LOGICAL RECORD OF FILE "PU1100-UPFILE". THE KEY WAS DISCARDED.

AN ERROR WAS FOUND IN THE DEFINITION OF FILE "PU1100-UPFILE".


Please help in resolving this error


Thanks,
Paul
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 21, 2008 2:41 pm    Post subject:
Reply with quote

RECORD DPU-KEY

that is not a record key clause, that is a record clause.
Back to top
View user's profile Send private message
Paul1983

New User


Joined: 08 Jul 2008
Posts: 37
Location: bangy

PostPosted: Thu Aug 21, 2008 2:54 pm    Post subject:
Reply with quote

I changed as follows

SELECT PU1100-UPFILE ASSIGN UT19
ORGANIZATION IS INDEXED
RECORD KEY DPU-KEY
ACCESS IS DYNAMIC
FILE STATUS IS W120-FILE-STATUS.


Still it's giving same error

Thanks,
Paul
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 21, 2008 3:16 pm    Post subject:
Reply with quote

Paul,
Quote:

WAS NOT DEFINED WITHIN A LOGICAL RECORD OF FILE

and this is your logical record

01 DPU1100-UPFILE-REC PIC X(229).
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Thu Aug 21, 2008 4:00 pm    Post subject:
Reply with quote

DPU-KEY should be declared as a part of record structure. In your case 01 DPU1100-UPFILE-REC PIC X(229) does not show DPU-KEY.
Make it as below-
Code:
01 DPU1100-UPFILE-REC.
   05 DPU-KEY PIC X(12).
   05 filler      PIC X(217).

Let us know if it works.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us