Function SET191C
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_191);
********** COMMENT(Function .......: SET191C);
********** COMMENT(Created on .....: 10/10/00 at 14:43:32);
********** COMMENT(Description ....: OV_FILE_SERVICE CHECK_DIR MAKE_DIR);
********** COMMENT(Version.........: 1);
**********;
********** COMMENT(This function asks you to nominate a directory name. If);
********** COMMENT( it does not already exist you are prompted as to );
********** COMMENT(whether you want to create it);
**********;
********** 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);
DEFINE FIELD(#OV_MBA) TYPE(*CHAR) LENGTH(1);
********** COMMENT();
********** COMMENT(Mainline);
********** COMMENT();
DEF_COND NAME(*AS400) COND('*CPUTYPE = AS400');
IF COND(*AS400);
MESSAGE MSGTXT('Not available on iSeries');
MENU;
ELSE;
BEGIN_LOOP;
REQUEST FIELDS((#OV_DIRECT *NOID));
USE BUILTIN(OV_FILE_SERVICE) WITH_ARGS(CHECK_DIR #OV_DIRECT) TO_GET(#OV_RETC);
IF COND('#OV_RETC = OK');
MESSAGE MSGTXT('This directory already exists');
ELSE;
USE BUILTIN(OV_MESSAGE_BOX) WITH_ARGS('Do you want to create this directory ?' 'Create ?' YN Q) TO_GET(#OV_MBA);
IF COND('#OV_MBA = Y');
USE BUILTIN(OV_FILE_SERVICE) WITH_ARGS(MAKE_DIR #OV_DIRECT) TO_GET(#OV_RETC);
IF COND('#OV_RETC *NE OK');
MESSAGE MSGTXT('Attempt to create directory failed');
ENDIF;
ENDIF;
ENDIF;
END_LOOP;
ENDIF;
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_191);
********** COMMENT(Function .......: SET191C);
********** COMMENT(Created on .....: 10/10/00 at 14:43:32);
********** COMMENT(Description ....: OV_FILE_SERVICE CHECK_DIR MAKE_DIR);
********** COMMENT(Version.........: 1);
**********;
********** COMMENT(This function asks you to nominate a directory name. If);
********** COMMENT( it does not already exist you are prompted as to );
********** COMMENT(whether you want to create it);
**********;
********** 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);
DEFINE FIELD(#OV_MBA) TYPE(*CHAR) LENGTH(1);
********** COMMENT();
********** COMMENT(Mainline);
********** COMMENT();
DEF_COND NAME(*AS400) COND('*CPUTYPE = AS400');
IF COND(*AS400);
MESSAGE MSGTXT('Not available on iSeries');
MENU;
ELSE;
BEGIN_LOOP;
REQUEST FIELDS((#OV_DIRECT *NOID));
USE BUILTIN(OV_FILE_SERVICE) WITH_ARGS(CHECK_DIR #OV_DIRECT) TO_GET(#OV_RETC);
IF COND('#OV_RETC = OK');
MESSAGE MSGTXT('This directory already exists');
ELSE;
USE BUILTIN(OV_MESSAGE_BOX) WITH_ARGS('Do you want to create this directory ?' 'Create ?' YN Q) TO_GET(#OV_MBA);
IF COND('#OV_MBA = Y');
USE BUILTIN(OV_FILE_SERVICE) WITH_ARGS(MAKE_DIR #OV_DIRECT) TO_GET(#OV_RETC);
IF COND('#OV_RETC *NE OK');
MESSAGE MSGTXT('Attempt to create directory failed');
ENDIF;
ENDIF;
ENDIF;
END_LOOP;
ENDIF;