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
 

 

Modifying the "SEARCH ALL" for Enterprise Cobol co

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Modifying the "SEARCH ALL" for Enterprise Cobol co
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    Post subject:
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    Post subject:
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    Post subject:
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: 7931
Location: Bellevue, IA

PostPosted: Wed Nov 19, 2008 5:52 pm    Post subject:
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: 685
Location: Earth

PostPosted: Wed Nov 19, 2008 7:02 pm    Post subject:
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 www.ibm.com/software/awdtools/cobol/zos/support/
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    Post subject:
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: 7931
Location: Bellevue, IA

PostPosted: Wed Nov 19, 2008 7:18 pm    Post subject:
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

Site Director


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

PostPosted: Thu Nov 20, 2008 4:21 am    Post subject:
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    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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


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