Function SET191D

LANSA

Function SET191D
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_191);
********** COMMENT(Function .......: SET191D);
********** COMMENT(Created on .....: 10/10/00 at 14:43:32);
********** COMMENT(Description ....: OV_FILE_SERVICE CHECK_FILE);
********** COMMENT(Version.........: 1);
**********;
********** COMMENT(This function requests a file name and then indicates );
********** COMMENT(whether or not the file exists);
**********;
********** COMMENT(Disclaimer: The following material is supplied as an);
********** COMMENT(example only. No warranty is expressed or implied.);
**********;
********** COMMENT(Receives: nothing);
**********;
********** COMMENT(=======================================================);
********** COMMENT(Function control options);
FUNCTION OPTIONS(*DIRECT);
DEFINE FIELD(#OV_DIRECT) TYPE(*CHAR) LENGTH(70);
DEFINE FIELD(#OV_RETC) TYPE(*CHAR) LENGTH(2);
********** COMMENT();
********** COMMENT(Mainline);
********** COMMENT();
DEF_COND NAME(*AS400) COND('*CPUTYPE = AS400');
IF COND(*AS400);
MESSAGE MSGTXT('Not available on iSeries');
MENU;
ELSE;
BEGIN_LOOP;
MESSAGE MSGTXT('Specify name of file whose existence is to be checked for');
REQUEST FIELDS((#OV_DIRECT *NOID));
USE BUILTIN(OV_FILE_SERVICE) WITH_ARGS(CHECK_FILE #OV_DIRECT) TO_GET(#OV_RETC);
IF COND('#OV_RETC = OK');
MESSAGE MSGTXT('This file exists');
ELSE;
MESSAGE MSGTXT('This file does NOT exist');
ENDIF;
DISPLAY FIELDS((#OV_DIRECT *NOID));
END_LOOP;
ENDIF;