Page 1 of 1

select from unknown file

Posted: Sun May 24, 2020 10:54 pm
by noamp
hey,
i use lansa on ibm i,
i need to select records from unknown file.
the user will write the file name into field and the function need to select the record from that file.

Code: Select all

SELECT     FIELDS((*ALL)) FROM_FILE(#FILE)
ADD_ENTRY  TO_LIST(#LIST01) WITH_MODE(*DISPLAY)
ENDSELECT
please if someone know any way to do it.
thatks

Re: select from unknown file

Posted: Mon May 25, 2020 8:45 am
by soa
Use the ACCESS_FILE BIF or SELECT_SQL with a USING parameter.

Re: select from unknown file

Posted: Mon May 25, 2020 6:46 pm
by noamp
soa wrote: Mon May 25, 2020 8:45 am Use the ACCESS_FILE BIF or SELECT_SQL with a USING parameter.
Thank you!