IN API: Option to Support Files and Folders Validation
IN API: Option to Support Files and Folders Validation
The IN API has been enhanced to allow the programmer to specify input as a file or folder. When this new option is used, F7 will be automatically available to browse for files or folders as appropriate.
Screen Parameters |
Comment |
IN,rr,cc,ww,tp |
t = F indicates this input field is a filename or a folder. When t = F, p can have the following values: p = F means the file may or may not exist. Folder portion of the filename must exist. p = E means the user must input a filename that already exist. p = W means the file should already exist and a warning will be displayed if a new filename is selected. Folder portion of the filename must exist. p = N means the file should not already exist and a warning will be displayed if it does. Folder portion of the filename must exist. p = P means a folder (path) must be input and it may or may not already exist. p = M means a folder must be input and it must already exist. |
The following rules also will apply:
- If the user leaves the field blank, no verification will be done and a blank field will be returned to the application program.
- If a non-required filename is entered (Screen-Type-2 = F or W or N), the folder portion of the filename will be verified and must exist, even though the file does not have to exist.
Examples:
IN,04,04,50,FE will enable Browse for File and, when the user attempts to exit the field, the filename selected or typed will be checked, and, if it does not exist, a message will be displayed, and the user will not be able to complete the IN call until an existing file is selected or the field is blanked out.
IN,04,04,50,FW will enable Browse for File and, when the user attempts to exit the field, the filename selected or typed will be checked, and, if it does not exist, a warning message will be displayed, and the user can move to the next filed.
IN,04,04,50,FP will enable Browse for Folder; the Make New Folder button will be available in the Browse for Folder dialog; and there is no validation of the existence of the selected folder.
IN,04,04,50,FM will enable Browse for Folder; the Make New Folder button will not appear on the Browse for Folder dialog; and the user will not be able to leave the field until an existing folder is selected or the field is blanked out.
JEG
NWSMSCRN.CBL