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

OCCURS with Descending Key option and order of data entry


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
morpheus007

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Tue Jul 01, 2008 5:21 pm
Reply with quote

We have a requirement to parse an occurs table and compare the values in the table based on a date field.

If we declare the table with descending key on the field being used to compare and the input data is not ordered in descending order of tht field does cobol rearrange data when values are loaded or do we get an error.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jul 01, 2008 5:35 pm
Reply with quote

You are responsible for the loading the table in the correct order.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Jul 01, 2008 6:04 pm
Reply with quote

When you load the table, you will not get an error if the fields are not in correct sequence -- it is up to your program to verify this and take appropriate action.

Furthermore, if the table is not loaded in key sequence, as the manual states, the results of your SEARCH ALL will be unpredictable.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Rotate partition-logical & physic... DB2 0
Search our Forums:

Back to Top