0 pts.
 SELECT AND OMIT in RPGILE
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
ASKED: February 4, 2010  5:15 AM
UPDATED: February 6, 2010  9:33 PM

Answer Wiki:
%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, ......
Last Wiki Answer Submitted:  February 4, 2010  8:35 am  by  Abdulonas400   125 pts.
All Answer Wiki Contributors:  Abdulonas400   125 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

You can’t use SELECT/OMIT LEVEL without Key Field .

 125 pts.

 

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

 110,215 pts.

 

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 pts.