CALL "C$OPENSAVEBOX" USING opCode parameters GIVING returnCode |
opCode | It is the function to be executed. Valid values, defined in isopensave.def, are: | |
Check if the host system supports the C$OPENSAVEBOX library routine. | ||
Open an "Open" dialog box. | ||
Open a "Save as " dialog box. | ||
Open an "Open" dialog box showing directories only. | ||
Open an "Open" dialog box allowing to select multiple items. | ||
Open an "Open" dialog box showing directories only and allowing to select multiple items. | ||
Returns the next item of a multiple selection performed through OPENSAVE-OPEN-BOX-MULTI or OPENSAVE-BROWSE-FOLDER-MULTI. | ||
Open a "Save as " dialog box that automatically performs a check on file existence. | ||
parameters | Parameters depend on the opcode. |
PROGRAM-ID. multisel. WORKING-STORAGE SECTION. copy "isopensave.def". PROCEDURE DIVISION. MAIN. initialize opensave-data. call "C$OPENSAVEBOX" using opensave-open-box-multi opensave-data. if return-code = 1 perform show-selected-file perform until exit initialize opensave-data call "C$OPENSAVEBOX" using opensave-next opensave-data if return-code = -1 exit perform else perform show-selected-file end-if end-perform end-if. goback. show-selected-file. display message opnsav-filename title "The user has selected". |
WORKING-STORAGE SECTION. copy "isopensave.def". PROCEDURE DIVISION. MAIN. initialize opensave-data. move "Text files (*.txt)|*.txt” to opnsav-filters. call "C$OPENSAVEBOX" using opensave-open-box opensave-data. |
*> copy "isopensave.def" on working-storage initialize opensave-data move "Save to file" to opnsav-title call "c$opensavebox" using opensave-save-box-checked, opensave-data giving opensave-status if opensave-status > 0 display message "Saving to file : " opnsav-filename else display message "Operation cancelled" end-if |