Function SET193I: Initialize/Cleanup Logic
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_193);
********** COMMENT(Function .......: SET193I);
********** COMMENT(Created on .....: 11th October 2000);
********** COMMENT(Description ....: Initialize for NT/2000 examples);
********** COMMENT(Version.........: 1);
********** COMMENT(Full Description: This function initializes an AS/400);
********** COMMENT(partition for example 193. This function must);
********** COMMENT(be executed once before any of the examples are used.);
********** COMMENT(It can be subsequently used to clean up the data area);
********** COMMENT(and data queues that the examples use.);
********** COMMENT(Disclaimer: The following material is supplied as));
********** COMMENT( sample material only. No warranty concerning the));
********** COMMENT( material or its use in any way whatsoever is));
********** COMMENT( expressed or implied.));
********** COMMENT(Minimum Release of LANSA Required : 8.0);
********** COMMENT(=======================================================);
********** COMMENT();
FUNCTION OPTIONS(*DIRECT *LIGHTUSAGE);
********** COMMENT();
********** COMMENT(Define fully qualified data area name);
********** COMMENT();
DEFINE FIELD(#S_193DAQ) TYPE(*CHAR) LENGTH(021);
USE BUILTIN(TCONCAT) WITH_ARGS(#S_193DAL '/' #S_193DAN) TO_GET(#S_193DAQ);
********** COMMENT();
********** COMMENT(Define fully qualified data area name);
********** COMMENT();
DEFINE FIELD(#S_193DQG) TYPE(*CHAR) LENGTH(021);
USE BUILTIN(TCONCAT) WITH_ARGS(#S_193DAL '/' 'SET193*') TO_GET(#S_193DQG);
********** COMMENT();
********** COMMENT(Show Instructions);
********** COMMENT();
DISPLAY EXIT_KEY(*NO) PROMPT_KEY(*NO) TEXT('((*TMAP001 001 001))');
********** COMMENT();
********** COMMENT(Create the controlling data area (ignore errors));
********** COMMENT();
EXEC_OS400 COMMAND('CRTDTAARA DTAARA(#S_193DAQ) TYPE(*CHAR) LEN(256) AUT(*ALL)') IF_ERROR(*NEXT);
********** COMMENT();
********** COMMENT(Change the data area to blanks);
********** COMMENT();
EXEC_OS400 COMMAND('CHGDTAARA DTAARA(#S_193DAQ) VALUE('' '')');
********** COMMENT();
********** COMMENT(Delete all data queues named SET193* from the data lib);
********** COMMENT();
EXEC_OS400 COMMAND('DLTDTAQ DTAQ(#S_193DQG)') IF_ERROR(*NEXT);
********** COMMENT();
********** COMMENT(Clear all messages to avoid confusion);
********** COMMENT();
USE BUILTIN(CLR_MESSAGES);
MESSAGE MSGTXT('Initialization and/or cleanup for example 193 completed');
********** COMMENT();
********** COMMENT(Finished);
********** COMMENT();
MENU;
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_193);
********** COMMENT(Function .......: SET193I);
********** COMMENT(Created on .....: 11th October 2000);
********** COMMENT(Description ....: Initialize for NT/2000 examples);
********** COMMENT(Version.........: 1);
********** COMMENT(Full Description: This function initializes an AS/400);
********** COMMENT(partition for example 193. This function must);
********** COMMENT(be executed once before any of the examples are used.);
********** COMMENT(It can be subsequently used to clean up the data area);
********** COMMENT(and data queues that the examples use.);
********** COMMENT(Disclaimer: The following material is supplied as));
********** COMMENT( sample material only. No warranty concerning the));
********** COMMENT( material or its use in any way whatsoever is));
********** COMMENT( expressed or implied.));
********** COMMENT(Minimum Release of LANSA Required : 8.0);
********** COMMENT(=======================================================);
********** COMMENT();
FUNCTION OPTIONS(*DIRECT *LIGHTUSAGE);
********** COMMENT();
********** COMMENT(Define fully qualified data area name);
********** COMMENT();
DEFINE FIELD(#S_193DAQ) TYPE(*CHAR) LENGTH(021);
USE BUILTIN(TCONCAT) WITH_ARGS(#S_193DAL '/' #S_193DAN) TO_GET(#S_193DAQ);
********** COMMENT();
********** COMMENT(Define fully qualified data area name);
********** COMMENT();
DEFINE FIELD(#S_193DQG) TYPE(*CHAR) LENGTH(021);
USE BUILTIN(TCONCAT) WITH_ARGS(#S_193DAL '/' 'SET193*') TO_GET(#S_193DQG);
********** COMMENT();
********** COMMENT(Show Instructions);
********** COMMENT();
DISPLAY EXIT_KEY(*NO) PROMPT_KEY(*NO) TEXT('((*TMAP001 001 001))');
********** COMMENT();
********** COMMENT(Create the controlling data area (ignore errors));
********** COMMENT();
EXEC_OS400 COMMAND('CRTDTAARA DTAARA(#S_193DAQ) TYPE(*CHAR) LEN(256) AUT(*ALL)') IF_ERROR(*NEXT);
********** COMMENT();
********** COMMENT(Change the data area to blanks);
********** COMMENT();
EXEC_OS400 COMMAND('CHGDTAARA DTAARA(#S_193DAQ) VALUE('' '')');
********** COMMENT();
********** COMMENT(Delete all data queues named SET193* from the data lib);
********** COMMENT();
EXEC_OS400 COMMAND('DLTDTAQ DTAQ(#S_193DQG)') IF_ERROR(*NEXT);
********** COMMENT();
********** COMMENT(Clear all messages to avoid confusion);
********** COMMENT();
USE BUILTIN(CLR_MESSAGES);
MESSAGE MSGTXT('Initialization and/or cleanup for example 193 completed');
********** COMMENT();
********** COMMENT(Finished);
********** COMMENT();
MENU;