Demonstrates code to select a file name.
ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 Filename PIC X(256). 01 FileMask PIC X(30). 01 FileStyle PIC S9(9) COMP-5. 01 ReturnValue PIC S9(9) COMP-5. PROCEDURE DIVISION. * Specify the types of files to list MOVE "All files|*.*|Text files|*.txt" TO FileMask * Specify the File Open dialog. * (Change this to POW-CDSAVE if you need * the File Save Dialog.) ADD POW-CDOPEN TO FileStyle * Specify the behavior required if the * user changes the current directory when * browsing for a file to open. ADD POW-CDCHANGEDIR TO FileStyle INVOKE MainForm "GetFileName" USING FileName "Title Displayed in Title Bar" FileMask FileStyle RETURNING ReturnValue