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
 
A Very weird compiling error for VSAM file-control

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

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Thu Jul 09, 2009 3:34 pm    Post subject: A Very weird compiling error for VSAM file-control
Reply with quote

Code:

FILE-CONTROL
      SELECT ZIPCODE-FILE                     
       ASSIGN TO UT-S-ZIPCODE           
       ORGANIZATION IS INDEXED           
       ACCESS MODE IS RANDOM             
       RECORD KEY  IS ZIPCODE           
       FILE STATUS IS WS-ZIPTABLE-STATUS.
 


I have created a KSDS use the following code:

DEFINE CLUSTER (NAME('ZIPSITE.ZIPTABLE') -
KEYS(5 0)-
TRACKS(10 10)-
RECSZ(5 5))-
DATA (NAME('ZIPSITE.ZIPTABLE.DATA')) -
INDEX (NAME('ZIPSITE.ZIPTABLE.INDEX') )

Here is the error compiling msg:
Code:

E-The "ORGANIZATION" clause for file "ZIPCODE-FILE" specified an organization that was different from the organization specified in the assignment-name.  An organization of "INDEXED" was assumed.

S-A "RECORD KEY" clause was missing or invalid in the "SELECT" entry for file "ZIPCODE-FILE".  The file definition was discarded.

S-"RECORD KEY" or "ALTERNATE RECORD KEY" "ZIPCODE" was not
defined within a logica "ZIPCODE-FILE".  The key was discarded.

The "LABEL" clause was processed as comments for this file definition.         
                                                                               
The "BLOCK CONTAINS" clause was processed as comments for this file definition.
                                                                               
A "RECORDING MODE" clause was found for a file that did not have physical "SEQUENTIAL" organization.  The "RECORDING MODE" clause was discarded.


Sincerely holp somebody can help me out.[/code]
Back to top
View user's profile Send private message

Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Thu Jul 09, 2009 3:41 pm    Post subject: Reply to: A Very weird compiling error for VSAM file-control
Reply with quote

You are saying it is KSDS file.

Then, please change the assign statement as below.

Code:
ASSIGN TO VSAM-ZIPCODE
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jul 09, 2009 4:55 pm    Post subject:
Reply with quote

The COBOL Language Reference manual, at the manuals link at the top of the page, explicitly states that UT-S-ddname will be a sequential file. If you had said
Code:
       ASSIGN TO UT-ZIPCODE 
or even
Code:
       ASSIGN TO ZIPCODE 
that would have been fine.

Some of the error messages you posted reference the FD clause in the FILE SECTION, yet you did not post it. Psychic day is not today, so we cannot give you any help on data you did not post.
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Thu Jul 09, 2009 5:55 pm    Post subject: Reply to: A Very weird compiling error for VSAM file-control
Reply with quote

Robert,

I thought 'VSAM-' or even without that will be correct one in above FD.

Can you correct me if something wrong.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jul 09, 2009 6:01 pm    Post subject:
Reply with quote

There are only three requirements for an ASSIGN:
1. The DDNAME is required.
2. If the file is sequential VSAM (ESDS), you must have AS-ddname (with an optional label- in front of the AS).
3. If the format is label-S-ddname, COBOL expects the file to be QSAM sequential and will have problems if the file is not QSAM sequential. The label- is also optional.

Your VSAM- is considered a label and is optional in all cases. You could even have VSAM-S-DDNAME which would assign DDNAME to a QSAM sequential file -- the VSAM- is not used by COBOL. You're not really wrong by putting it, but you're not providing COBOL anything it will use.
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Thu Jul 09, 2009 6:12 pm    Post subject:
Reply with quote

Thanks.

Crystal Clear icon_smile.gif
Back to top
View user's profile Send private message
Lord.of.Wind

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Fri Jul 10, 2009 7:29 am    Post subject:
Reply with quote

Thanks.

Crystal Clear TOO! icon_biggrin.gif
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm

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