Need Cobol 88 equivalent

pts.
Tags:
RPG
I'm coding an RPG program and I need to find a technique that will allow me to evaluate the value of a variable to determine if it matches any one of a list or is within a range of given values. In Cobol I use 88 level entries in working storage. In other languages, SAS for instance I can use an "IN" function that checks to see if the value contained in the current instance of the variable is in a list of values. I am new to RPG and would like to know if there is a similar function or feature. Thank you, Kurt Langenmayr

Answer Wiki

Thanks. We'll let you know when a new response is added.

ready for sql ? uses an embedded SET statement.
prefer internal table ? use a lokup opcode

======================================================

You don’t say what OS version/release you have. Assuming it’s at least V5, just write a small COBOL procedure. Bind it with your RPG into a single program object.

That’s a major point to the whole ILE concept. Write routines in whatever language is appropriate. They can all be bound together into single program objects.

And if you have RPG, the same license works for COBOL (and C or C++). Just load the COBOL compiler.

If you also have a SQL Dev Kit license, it applies to all languages too. This makes the COBOL unnecessary though, because as JPLamontre noted, a simple SQL statements can perform IN() tests.

Tom

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Walter47
    Evaluation/eval 1. Converting an expression into a value using some reduction strategy. 2. The process of examing a system component to determine the extent to witch to which specivic properties are present. You may find this and other solutions on-line at instantweb.com/foldoc/
    120 pointsBadges:
    report
  • Rlsantucijr
    If you are testing single characters, you can use the %SCAN BIF: D Valid_Values S 10A INZ('AFHWSKL91Z') C IF $SCAN ( Response : Valid_Values ) If you are testing values, you could use an array (table) of the values, then the %LOOKUP BIF: C IF %LOOKUP ( Response : Valid_Values )
    445 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following