Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6970
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: 6970
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us