Form S_195FMF: Execution Harness for SET195A
* ===================================================================;
*;
* Component : S_195FMF;
* Type : Form;
* Ancestor : PRIM_FORM;
* ;
* Description : Copy AS/400 Folder in Windows Directory;
*;
* Disclaimer : The following material is supplied as sample material ;
* only. No warranty concerning this material or its use ;
* in any way whatsoever is expressed or implied. ;
* ;
* ===================================================================;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM HEIGHT(265) LAYOUTMANAGER(#FWLM_1) LEFT(349) TOP(203) VISUALSTYLE(#VS_NORM) WIDTH(343);
;
DEFINE_COM CLASS(#STD_OBJ.Visual) NAME(#VIS_USER) CAPTION('AS/400 User Profile to Use') DISPLAYPOSITION(1) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(1) TOP(9) WIDTH(247);
DEFINE_COM CLASS(#STD_OBJ.Visual) NAME(#VIS_PASSWORD) CAPTION('Password for AS/400 User') DISPLAYPOSITION(2) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(2) TOP(34) WIDTH(248);
DEFINE_COM CLASS(#STD_TEXTS.Visual) NAME(#VIS_AS400) CAPTION('Name of AS/400 System') DISPLAYPOSITION(3) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(3) TOP(59) WIDTH(297);
DEFINE_COM CLASS(#STD_TEXTL.Visual) NAME(#VIS_FROM) CAPTION('Copy From AS/400 Folder') DISPLAYPOSITION(4) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(4) TOP(84) WIDTH(300);
DEFINE_COM CLASS(#STD_TEXTL.Visual) NAME(#VIS_TO) CAPTION('Copy To Windows Directory') DISPLAYPOSITION(5) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(5) TOP(109) WIDTH(300);
DEFINE_COM CLASS(#STD_BOOL.Visual) NAME(#VIS_RETCODE) CAPTION('Return Code') DISPLAYPOSITION(7) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) READONLY(True) TABPOSITION(7) TABSTOP(False) TOP(159) VISUALSTYLE(#VS_NOREAD) WIDTH(184);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#COPY_FOLDER) CAPTION('Copy Folder') DISPLAYPOSITION(8) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(8) TOP(184);
DEFINE_COM CLASS(#STD_OBJ.Visual) NAME(#VIS_LOCAL_PASSWORD) CAPTION('Local DBMS Password') DISPLAYPOSITION(6) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(6) TOP(134) WIDTH(247);
DEFINE_COM CLASS(#PRIM_FWLM) NAME(#FWLM_1) DIRECTION(TopToBottom) FLOWOPERATION(Center) FLOWOPERATIONVER(Spread) MARGINLEFT(8) MARGINRIGHT(8) MARGINTOP(8) SPACING(5) SPACINGITEMS(5);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_1) MANAGE(#VIS_USER) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_2) MANAGE(#VIS_PASSWORD) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_3) MANAGE(#VIS_AS400) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_4) MANAGE(#VIS_FROM) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_5) MANAGE(#VIS_TO) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_6) MANAGE(#VIS_RETCODE) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_7) MANAGE(#COPY_FOLDER) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_8) MANAGE(#VIS_LOCAL_PASSWORD) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_STBR) NAME(#STBR_1) DISPLAYPOSITION(9) HEIGHT(22) LEFT(0) MESSAGEPOSITION(1) PARENT(#COM_OWNER) TABPOSITION(9) TABSTOP(False) TOP(216) WIDTH(335);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_9) MANAGE(#STBR_1) PARENT(#FWLM_1);
DEFINE FIELD(#S_195USER) REFFLD(#STD_OBJ) DESC('The AS/400 User Profile to use');
DEFINE FIELD(#S_195PSPW) REFFLD(#STD_OBJ) DESC('The password for the AS/400 User Profile');
DEFINE FIELD(#S_195PSWD) REFFLD(#STD_OBJ) DESC('The local Windows DBMS Password (eg:SQL)');
DEFINE FIELD(#S_195PSLU) TYPE(*CHAR) LENGTH(20) DESC('The network name of the AS/400');
DEFINE FIELD(#S_195FRF) TYPE(*CHAR) LENGTH(100) DESC('Copy from AS/400 Folder with this Name');
DEFINE FIELD(#S_195TOF) TYPE(*CHAR) LENGTH(100) DESC('Copy to Windows Directory with this Name');
DEFINE FIELD(#S_195RETC) TYPE(*CHAR) LENGTH(2) DESC('Return Code');
;
def_cond *inputok '(#S_195RetC = OK) and (#Vis_USER.Value *ne *blanks) and (#Vis_PASSWORD.value *ne *blanks) and (#Vis_as400.Value *ne *blanks) and (#Vis_from.Value *ne *blanks) and (#Vis_to.Value *ne *blanks) and (#Vis_LOCAL_PASSWORD.Value *ne *blanks)';
;
* --------------------------;
* Handle form initialization;
* --------------------------;
;
EVTROUTINE HANDLING(#com_owner.initialize);
;
SET #com_owner caption(*component_desc);
;
Set #Vis_from Value(qdls\xxxxxxx);
Set #Vis_to Value(c:\temp);
Set #Vis_LOCAL_PASSWORD Value(SQL);
;
Invoke #Com_Owner.ValidateInput ;
;
Endroutine;
;
* ----------------------;
* Handle the Copy Button;
* ----------------------;
;
EVTROUTINE HANDLING(#COPY_FOLDER.Click);
;
Change #S_195User #Vis_USER.Value;
Change #S_195pspw #Vis_PASSWORD.Value;
Change #S_195pslu #Vis_as400.Value;
Change #S_195frf #Vis_from.Value;
Change #S_195tof #Vis_to.Value;
Change #S_195pswd #Vis_LOCAL_PASSWORD.Value;
;
Exchange Fields(#s_195user #s_195pspw #s_195pswd #s_195pslu #s_195frf #s_195tof);
;
Call Process(*Direct) Function(SET195A) exit_used(*next) Menu_Used(*next) ;
;
Set #Vis_retcode value(#S_195retc) ;
;
ENDROUTINE;
;
* --------------------;
* Handle input changes;
* --------------------;
;
EvtRoutine Handling(#Vis_USER.Changed #Vis_password.Changed #Vis_as400.Changed #Vis_from.Changed #Vis_to.Changed #Vis_LOCAL_PASSWORD.Changed) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS);
Invoke #Com_Owner.ValidateInput ;
EndRoutine;
;
* --------------;
* Validate Input;
* --------------;
;
Mthroutine ValidateInput;
Use ov_file_Service (Check_Dir #Vis_To.Value) (#S_195RetC);
Set #COPY_FOLDER Enabled(*inputok) ;
EndRoutine;
;
;
END_COM;
* ===================================================================;
*;
* Component : S_195FMF;
* Type : Form;
* Ancestor : PRIM_FORM;
* ;
* Description : Copy AS/400 Folder in Windows Directory;
*;
* Disclaimer : The following material is supplied as sample material ;
* only. No warranty concerning this material or its use ;
* in any way whatsoever is expressed or implied. ;
* ;
* ===================================================================;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM HEIGHT(265) LAYOUTMANAGER(#FWLM_1) LEFT(349) TOP(203) VISUALSTYLE(#VS_NORM) WIDTH(343);
;
DEFINE_COM CLASS(#STD_OBJ.Visual) NAME(#VIS_USER) CAPTION('AS/400 User Profile to Use') DISPLAYPOSITION(1) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(1) TOP(9) WIDTH(247);
DEFINE_COM CLASS(#STD_OBJ.Visual) NAME(#VIS_PASSWORD) CAPTION('Password for AS/400 User') DISPLAYPOSITION(2) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(2) TOP(34) WIDTH(248);
DEFINE_COM CLASS(#STD_TEXTS.Visual) NAME(#VIS_AS400) CAPTION('Name of AS/400 System') DISPLAYPOSITION(3) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(3) TOP(59) WIDTH(297);
DEFINE_COM CLASS(#STD_TEXTL.Visual) NAME(#VIS_FROM) CAPTION('Copy From AS/400 Folder') DISPLAYPOSITION(4) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(4) TOP(84) WIDTH(300);
DEFINE_COM CLASS(#STD_TEXTL.Visual) NAME(#VIS_TO) CAPTION('Copy To Windows Directory') DISPLAYPOSITION(5) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(5) TOP(109) WIDTH(300);
DEFINE_COM CLASS(#STD_BOOL.Visual) NAME(#VIS_RETCODE) CAPTION('Return Code') DISPLAYPOSITION(7) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) READONLY(True) TABPOSITION(7) TABSTOP(False) TOP(159) VISUALSTYLE(#VS_NOREAD) WIDTH(184);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#COPY_FOLDER) CAPTION('Copy Folder') DISPLAYPOSITION(8) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(8) TOP(184);
DEFINE_COM CLASS(#STD_OBJ.Visual) NAME(#VIS_LOCAL_PASSWORD) CAPTION('Local DBMS Password') DISPLAYPOSITION(6) HEIGHT(19) LABELTYPE(Caption) PARENT(#COM_OWNER) TABPOSITION(6) TOP(134) WIDTH(247);
DEFINE_COM CLASS(#PRIM_FWLM) NAME(#FWLM_1) DIRECTION(TopToBottom) FLOWOPERATION(Center) FLOWOPERATIONVER(Spread) MARGINLEFT(8) MARGINRIGHT(8) MARGINTOP(8) SPACING(5) SPACINGITEMS(5);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_1) MANAGE(#VIS_USER) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_2) MANAGE(#VIS_PASSWORD) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_3) MANAGE(#VIS_AS400) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_4) MANAGE(#VIS_FROM) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_5) MANAGE(#VIS_TO) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_6) MANAGE(#VIS_RETCODE) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_7) MANAGE(#COPY_FOLDER) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_8) MANAGE(#VIS_LOCAL_PASSWORD) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_STBR) NAME(#STBR_1) DISPLAYPOSITION(9) HEIGHT(22) LEFT(0) MESSAGEPOSITION(1) PARENT(#COM_OWNER) TABPOSITION(9) TABSTOP(False) TOP(216) WIDTH(335);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_9) MANAGE(#STBR_1) PARENT(#FWLM_1);
DEFINE FIELD(#S_195USER) REFFLD(#STD_OBJ) DESC('The AS/400 User Profile to use');
DEFINE FIELD(#S_195PSPW) REFFLD(#STD_OBJ) DESC('The password for the AS/400 User Profile');
DEFINE FIELD(#S_195PSWD) REFFLD(#STD_OBJ) DESC('The local Windows DBMS Password (eg:SQL)');
DEFINE FIELD(#S_195PSLU) TYPE(*CHAR) LENGTH(20) DESC('The network name of the AS/400');
DEFINE FIELD(#S_195FRF) TYPE(*CHAR) LENGTH(100) DESC('Copy from AS/400 Folder with this Name');
DEFINE FIELD(#S_195TOF) TYPE(*CHAR) LENGTH(100) DESC('Copy to Windows Directory with this Name');
DEFINE FIELD(#S_195RETC) TYPE(*CHAR) LENGTH(2) DESC('Return Code');
;
def_cond *inputok '(#S_195RetC = OK) and (#Vis_USER.Value *ne *blanks) and (#Vis_PASSWORD.value *ne *blanks) and (#Vis_as400.Value *ne *blanks) and (#Vis_from.Value *ne *blanks) and (#Vis_to.Value *ne *blanks) and (#Vis_LOCAL_PASSWORD.Value *ne *blanks)';
;
* --------------------------;
* Handle form initialization;
* --------------------------;
;
EVTROUTINE HANDLING(#com_owner.initialize);
;
SET #com_owner caption(*component_desc);
;
Set #Vis_from Value(qdls\xxxxxxx);
Set #Vis_to Value(c:\temp);
Set #Vis_LOCAL_PASSWORD Value(SQL);
;
Invoke #Com_Owner.ValidateInput ;
;
Endroutine;
;
* ----------------------;
* Handle the Copy Button;
* ----------------------;
;
EVTROUTINE HANDLING(#COPY_FOLDER.Click);
;
Change #S_195User #Vis_USER.Value;
Change #S_195pspw #Vis_PASSWORD.Value;
Change #S_195pslu #Vis_as400.Value;
Change #S_195frf #Vis_from.Value;
Change #S_195tof #Vis_to.Value;
Change #S_195pswd #Vis_LOCAL_PASSWORD.Value;
;
Exchange Fields(#s_195user #s_195pspw #s_195pswd #s_195pslu #s_195frf #s_195tof);
;
Call Process(*Direct) Function(SET195A) exit_used(*next) Menu_Used(*next) ;
;
Set #Vis_retcode value(#S_195retc) ;
;
ENDROUTINE;
;
* --------------------;
* Handle input changes;
* --------------------;
;
EvtRoutine Handling(#Vis_USER.Changed #Vis_password.Changed #Vis_as400.Changed #Vis_from.Changed #Vis_to.Changed #Vis_LOCAL_PASSWORD.Changed) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS);
Invoke #Com_Owner.ValidateInput ;
EndRoutine;
;
* --------------;
* Validate Input;
* --------------;
;
Mthroutine ValidateInput;
Use ov_file_Service (Check_Dir #Vis_To.Value) (#S_195RetC);
Set #COPY_FOLDER Enabled(*inputok) ;
EndRoutine;
;
;
END_COM;