SELECT AND OMIT in RPGILE

385 pts.
Tags:
IBM DB2
RPG ILE
hI,GUYS,Actually select and omit used in lagical file to control the records,values like.

But without key field how can i use these select and omit condition in logical file?

And one more doubt is what is the exact uses of %SCAN,%SUBST,

%SUBDT,%EOF,%CHECK,%COMMIT,%FOUND.Plese explain these



Software/Hardware used:
softwre or hardware

Answer Wiki

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

%SCAN for checking a value in a field by using an Indicator at EQ , where it is existed or not .
It gives first place where it found .

%SUBST to extract a portion from a field .

%EOF to check , whether the file reached to the bottom or not .

%CHECK to check a value in a field . but it is exactly opposite to % SCAN , because it gives first not existed position .

%FOUND to findout the record is existed or not while used READ or CHAIN, ……

Discuss This Question: 5  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
  • Abdulonas400
    You can't use SELECT/OMIT LEVEL without Key Field .
    125 pointsBadges:
    report
  • TomLiotta
    You can’t use SELECT/OMIT LEVEL without Key Field . Not true. From the DDS manual:
    • You can specify select/omit fields only if you also specify key fields or if you also specify the DYNSLT keyword for the file. You can also specify *NONE as a key field to satisfy the requirement for a key field when your application requires no key fields.
    As noted, there are two ways to use Select/Omit without key fields. There have been times when S/O specifications have been useful to me, but they have been rare and none have been recent. I would think hard before using them today. IMO, a simple VIEW is often a better choice. Tom
    125,585 pointsBadges:
    report
  • graybeard52
    As far as use for the BIF's, just open the lpex editor, enter %scan (or whatever) and press F1. Up pops the RPG manual positioned at the right page, with explanation and examples.
    3,115 pointsBadges:
    report
  • abhisheka1
    https://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/x091315219.htm , This lin will help you in understanding . Another site http://go4as400.com/# this site has description about basics of rpgle with example go through it will help you....
    385 pointsBadges:
    report
  • ToddN2000
    Another option if you want certain records is to use embedded SQL to do the SELECT.
    11,820 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