INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Jobs from Indeed

Level 88 with inspect

Level 88 with inspect

(OP)
Morning,

Can someone please shed some light on why the following is not working. It may be that you can't use level 88 with inspect.
I have the following part of code in my program but fails to work.


V2.58 03 WS-BAD-NAMES PIC X(10) VALUE SPACES.
v2.58 88 WS-CUST-BAD-NAMES VALUE 'occupie' 'occupant'
'a n other' 'household'
'homeowner' 'billpayer'
'landlord'.

INSPECT WS-LAST-NAME-LOWER TALLYING WS-OCCBILL
FOR ALL WS-CUST-BAD-NAMES

Thanks

RE: Level 88 with inspect

The 88 level only applies to the variable under which it falls. It is not a universal name, even though it is unique.

==================================
adaptive uber info galaxies (bigger, better, faster, and more adept than cognitive innovative agile big data clouds)


RE: Level 88 with inspect

[Welcome to Tek-Tips.]

Because that simply isn't how INSPECT works.

This particular INSPECT will increment WS-OCCBILL each time it finds 10 characters that match the current value of WS-BAD-NAMES. If WS-BAD-NAMES contains spaces, that is what will be used in the comparison.

You can probably achieve what you want by using multiple TALLYING phrases. Or, if it is clearer, use multiple INSPECT statements without re-initializing WS-OCCBILL (since INSPECT does not initialize the tally counter).

Tom Morrison
Hill Country Software

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close