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

Modifying the "SEARCH ALL" for Enterprise Cobol co


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

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Wed Nov 19, 2008 3:01 pm
Reply with quote

Hi,
We are updating the OS/390 to Enterprise Cobol. Enterprise Cobol does not support the "SEARCH ALL" command. Hence, we need to modify the programs wherever this command is used. Which command can be used to replace the "SEARCH ALL" command.
Thanks in advance for the help.
icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Nov 19, 2008 3:39 pm
Reply with quote

since when does Enterprise COBOL not support the 'SEARCH ALL' command?
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Wed Nov 19, 2008 3:49 pm
Reply with quote

I meant that Warning messages are issued during the compilation of the programs containing "SEARCH ALL" function. Hence we face problems during the compilation of the programs.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Nov 19, 2008 3:52 pm
Reply with quote

what are the warning messages?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Nov 19, 2008 5:52 pm
Reply with quote

Quote:
Which command can be used to replace the "SEARCH ALL" command.
Try "SEARCH ALL". Section 6.2.32 of the Enterprise COBOL Language Reference manual, format 2, includes SEARCH ALL as a valid and usable construct.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Nov 19, 2008 7:02 pm
Reply with quote

I got some infomation which may be useful to you.

Quote:
LE APAR PQ95124 corrected errors in the COBOL SEARCH
ALL statement.
However, users have found COBOL applications that
depend on the erroneous behavior!
SEARCH ALL with prior COBOL releases::
1. If search argument longer than table key, in some cases argument
matched key even when excess digits/characters were not
zeros/blanks:
01 Arg1 pic X(8). "ABCDxxxx".
...
03 Key1 pic X(4). "ABCD"
2. Signed search argument with negative value may match
unsigned table key:
01 Arg2 pic S9(4). -1234

03 Key2 pic 9(4). 1234
Note: these should compare unequal! Just as in:
IF Key(IX) = Arg …
SEARCH … WHEN Key(IX) = Arg … (serial search, no ALL…)
V3R4 compiled SEARCH ALL WHEN will compare unequal as well.
V4 compiler (and V3R4 with PTFs for APAR PK16765)
generates warning messages for SEARCH ALL statements
that might have different results. Whether an actual change
occurs depends on the contents of the search argument at
run time
LE/COBOL runtime (with PTFs for APAR PK15432)
generates warning messages if search argument value can
never match a table key
Go to Use [URL] BBCode for External Links
Search for item 1243387
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Nov 19, 2008 7:09 pm
Reply with quote

I imagine rahuindo's problem has to do with 'almost non-standard' data definitions used by the SEARCH ALL command, which earlier releases of COBOL accepted. As you migrate to a newer version of any application, backwards capatibility is usually protected: but poor code - bad syntax - is not accepted.

The OP has probably read the warnings and understands that he has crap modules that he must modify.

The problem is not with the new compiler, it is with the old garbage-sources.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Nov 19, 2008 7:18 pm
Reply with quote

Dick, on the other hand the O/P did say
Quote:
Which command can be used to replace the "SEARCH ALL" command.
so it sounds like the first choice is not to correct the bad syntax but to get rid of the code.

rahuindo: you're better off understanding why you're getting the messages and fixing them instead of dumping a section of code that might have been written to use SEARCH ALL for some very good reasons.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 20, 2008 4:21 am
Reply with quote

Hello,

And someone (DBZ) asked what the messages are. If you post the messages (including the messsage id's) we may be be to offer suggestions.

Unless you want to write your own binary search (a very bad choice for this situation), there is no "other command".

Either fix the code that generates the warning(s) or simply live with it.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top