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: 7990
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: 686
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: 7990
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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am


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