Declare the file as USROPN and use the EXTFILE keyword.
FArslp IF E K Disk Usropn Extfile(Arslp_Name)
* Salesperson Master File
* Stand-Alone Fields
D Arslp_Name S 21A
C If %OPEN(Arslp)
C Close Arslp
C Endif
C Eval Arslp_Name = %TRIM(Dbclib) + '/ARSLP'
C Open(E) Arslp
C If %error
* the file was not found in that library, or the library does not
exist
C Endif
Francis Lapeyre
IS Dept. Programmer/Analyst
Stewart Enterprises, Inc.
E-mail: flapeyre@xxxxxxxx
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[
mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of derek gonsalves
Sent: Tuesday, May 15, 2007 12:25 PM
To: RPG400-L@xxxxxxxxxxxx
Subject: Validate Data library name
Hi
I have a program wherein the user enters the data library name on the
screen, and the company name. Now I first need to validate if the
library is
a valid AS400 library and if yes then i need to validate the company
number
from the company master file present in that data library.
Any suggestions on how this can be handled??
Thanks in advance
Derek
As an Amazon Associate we earn from qualifying purchases.