Easy tips

What is SETLL?

What is SETLL?

name (file or record format) NR. ER. EQ. The SETLL operation positions a file at the next record that has a key or relative record number that is greater than or equal to the search argument (key or relative record number) operand specified (search-arg).

What is SETLL in as400?

SETLL opcode in rpgle-go4as400.com. SETLL sets the file pointer at the first occurrence of the record where the key field/RRN value is greater than or equal to the factor-1 search argument value. If the SETLL operation is not successful (no records found condition), the file is positioned to the end of the file.

How do you read a subfile?

To read a subfile randomly, you must specify, in the RELATIVE KEY data item, the relative record number of the subfile record you want to read and you must not specify the NEXT MODIFIED phrase in the Format 5 READ statement.

What is subfile in as400?

A subfile is nothing but just displaying records in tabular format on a display device. · It can be an editable tabular format due to which it can be used in data entry screen, inquiry(static) screen or combination of both i.e. editing the information for a particular inquiry.

What is the use of Ovrdbf in as400?

The Override with Database File (OVRDBF) command is used to (1) override (replace) the file named in the program, (2) override certain parameters of a file that are used by the program, or (3) override the file named in the program and override certain parameters of the file being processed.

What is decimal data error?

For a program variable, the most likely reason for a decimal data error is that the numeric variable is in a data structure that doesn’t specify the INZ keyword. In that case, the data structure gets initialized to all blanks.

What do you need to know about SETLL?

The SETLL operation positions a file at the next record that has a key or relative record number that is greater than or equal to the search argument (key or relative record number) specified in factor 1. The file must be a full procedural file (identified by an F in position 16 of the file description specifications).

When to use equal indicator in SETLL function?

SETLL does not cause the system to access a data record. If you are only interested in verifying that a key actually exists, SETLL with an equal indicator (positions 75-76) or the %EQUAL built-in function is a better performing solution than the CHAIN operation in most cases.

What happens if there is no record found in SETLL?

If the SETLL operation is not successful (no records found condition), the file is positioned to the end of the file. When end of file is reached on a file being processed by SETLL, another SETLL can be issued to reposition the file. After a SETLL operation successfully positions the file at a record, you retrieve this record by reading the file.

What happens when the SETLL operation is not successful?

Remember the following when using the SETLL operation: If the SETLL operation is not successful (no records found condition), the file is positioned to the end of the file. When end of file is reached on a file being processed by SETLL, another SETLL can be issued to reposition the file.

Author Image
Ruth Doyle