Interactive COBOL Documentation 5.xx 12-Jan-2017 The manual set for Interactive COBOL includes the following: Installing and Configuring Interactive COBOL on Linux (5.20 05/11/2016) (linuxic.pdf) Installing and Configuring Interactive COBOL on Windows (5.20 05/10/2016) (winic.pdf) Interactive COBOL Utilities Manual (5.24 12/30/2016) (utilic.pdf) Interactive COBOL Language Reference & Developer's Guide (5.25 01/12/2017) (referic.pdf) COBOL sp2 User Interface Development System User Guide (5.2 - 2014) (sp2.pdf) COBOL FormPrint User Guide (5.2 - 2014) (fp.pdf) Readme files may include (depending on components installed): readdoc.txt this readme readcopy.txt Third Party / Open Source Copyrights readic.txt general release information, bug fixes, and new features readinst.txt installation procedures, tips, and notes readodbc.txt installation and usage information for the ODBC driver readcgi.txt installation and usage information for the cgiCOBOL readsp2.txt general release information for sp2 and FormPrint components notesic.txt subset of readic.txt for just the lastest revision Documentation is available for download in Adobe Acrobat format (*.pdf) from our FTP site at ftp.icobol.com in the from the appropriate release directory or it can be accessed by following the 'Documentation' link from the home page at http://www.icobol.com. The .pdf format can be viewed online by using an Adobe Acrobat Reader that is available for most systems and can be downloaded free from Adobe (at ftp.adobe.com or www.adobe.com. These files can also be printed to various printers using the Adobe Reader. Following is a list of documentation changes that have not yet been incorporated in to the documentation listed. These should be printed as addendums to the online documentation or for insertion into printed copies of the appropriate manuals. Installing and Configuring on Linux (rev 5.20) ----------------------------------- None. Installing and Configuring on Windows (rev 5.20) ------------------------------------- None. Utilities Manual (rev 5.24) ---------------- None. Language Reference & Developer's Guide (rev 5.25) -------------------------------------- None. COBOL sp2 Manual ---------------- 1. Updated in 4.10. --------------- Sample programs --------------- example ------- Venerable program based on user guide tutorial. This covers the basics of program interaction with windows, panels and menus. bitmap ------ Setting the bitmap image to be displayed in an icon field at runtime. See bitmap2 for same functionality using the new, easier-to-use set-property call. bitmap2 ------- Setting the bitmap image to be displayed in an icon field using the set-property function. children -------- Handling child windows including switching between them. combobox -------- Setting the contents of a combobox list at runtime. See bitmap2 for same functionality using the new, easier-to-use set-property call. combo2 ------ Setting the contents of a combobox list at runtime using the set-property function. combo3 ------ Setting the contents of a combobox list that exceeds 32k of data. dbledisp -------- Displaying data in multiple windows. examplnf -------- Same as original example program with panels generated in working-storage so that no panel file is necessary at runtime. filelist -------- Handling listboxes containing directory lists. Normally file lists are handled using the query-file function. menumod ------- Modifying a menu at runtime - inserting, deleting, modifying menu options. mouseo ------ Advanced icons with mouse over features. multipan -------- Handling muliple panels in a window. This facility would only be used in special circumstances. Normally a window contains only one panel. repeat ------ Using repeat groups to display long lists of data (extended repeat groups). Data is passed from the program to the repeat group in blocks - additional blocks are supplied as needed. This program can be run with sp2thred.dll to allow smooth scrolling with the scrollbar and mouse. repeat2 ------- Handling extended repeat groups with extra long lists of data - greater than 32k occurrences. scrolwin -------- Modifying a window's size at runtime allowing the panel inside it to scroll. sp2dynam -------- Defining panels dynamically from your program. sp2glob ------- Using a program to make global modifications to all panels in a panel file. sp2maint -------- Same as sp2dynam except that resulting panels are saved to a panel file. sp2ver ------ Display runtime version in a messagebox. statusb ------- Advanced statusbar usage showing date and time. tabs ---- Handling tab windows including opening them and switching between them. Tab windows are essentially regular child windows with their Border type property set so they are displayed as a tab. thin3d ------ An alternative border type for fields. toolbar ------- Handling a toolbar including building a toolbar dynamically. COBOL FormPrint Manual (Version 5.1) ---------------------- 1. Updated in 3.57 --------------- New 5.1 Sample programs ------------------------ demoform -------- This covers the basics of program interaction with the printer and the form to be printed. chgbmp ------ Programatically setting the bitmap to be printed. chgbmp2 ------- Setting the bitmap to be printed using inline code rather than the qprbmp copy file. chgform ------- Changing a form programatically. newform ------- Defining a new form programatically. gridline -------- Drawing lines on a form. qprglob ------- Making global changes to a form file. -------------------- Major changes in 4.1 -------------------- Print preview scaling (4.1.7) ----------------------------- The size of the print preview window (including its contents) can be scaled up to fill more or less the whole screen by setting the configuration variables QPROWD=640, QPROHT=480, and QPROIC=1. This is different from maximizing the preview window by setting the title in the QPRPVT file because the text, etc. within the window will also become larger. The scaling is slightly different if the QPRFON x7 switch (see below) is also set to allow for the increased precision of the x7 feature. Preview accelerator keys (4.1.7, 4.1.0) --------------------------------------- The keys used to control print preview can now be configured by adding numeric key codes to the QPRPVT file. For example: 041~Next page PgDn#337 042~Previous page PgUp#329 043~First page ^PgUp#388 044~Last page ^PgDn#374 909#328 910#336 Codes 909 and 910 are for window scrollup/dn. In this case, the up and down arrow keys (328 and 336) are being used for scrollup/dn so that the PgUp and PgDn keys (329 and 337) can be used for Previous and Next page. Codes 911 and 912 allow keys to be assigned to the scroll left and right functions. For example: 911#331 912#333 This causes the left and right arrow keys (331 and 333) to be used for scrolling left and right. Form records in working-storage (4.1.7) --------------------------------------- Forms can now be stored in working-storage eliminating the need for panel files at runtime. The main disadvantage of this technique is that your programs will be bigger and performance may be degraded in thin client mode - records will be transmitted each time they are used rather than on a one-time basis. The working-storage definitions can be generated along with the regular cobol code using a new version of the code generator - use the template file qprnofil.cbx rather than uib.cbx if you want to do this. A new maintenance function, qpr-set-record, allows a record to be moved to qpr memory so that it can be accessed by print-page logic as if it had just been read from a panel file - see code produced from qprnofil.cbx for an example of this. Individual set-record calls must be made for each form used. Get/Set-property functions (4.1.7) ---------------------------------- Set individual properties avoiding the need for get/set-object-def maintenance functions. Maintenance copy files have been updated to use the set-property function. See chgbmp2.cbl for an example. The qprbmp/fnt/clr copy files have also been updated to use the set- property function rather than get/set-field-def. Usage: call "QPR" using qpr-get-property qpr-property call "QPR" using qpr-set-property qpr-property Where: pr-id = id of object (static, field, group, repeat) pr-row = row of static pr-col = column of static pr-key = key of property (made up of pr-object-type thru pr-var-act below) pr-object-type = type of object (W, P, S, F, G, R) pr-type = type of property (L=length, N=numeric, C=character, V=variable) pr-var-type = type of variable property (A=first, B=second, ...) pr-off = offset of property within object type pr-len = length of property pr-format = format (in pr-value) of property (N=number, B=binary, D=decimal) pr-action = action to be taken if setting property (R=redraw, C=recreate) pr-var-act = action to be taken if variable property (L=reset variable length) pr-value = value of property pr-num-value = value of property if format is N or D - pic 9(5) pr-bin-value = value of property if format is B pr-bit-value = value of property bit (0 or 1 - anything else means leave alone) length properties are read-only format=N assumes a 2 byte numeric property format=B/D assumes a 1 byte property Some common property keys: Static font: SN-0001000002NC- Static text: SVA0000000080-RL (set length as appropriate) Field row: FN-0001000002NC- Field col: FN-0001200002NC- Field width: FN-0002200002NR- Field height: FN-0002400002NR- Field font: FN-0004200002NC- Field color: FC-0007000001DR- Field format: FVA0000000010-RL (set length as appropriate) Field caption: FVB0000000080-RL (set length as appropriate) Field value: FVC0000000080-RL (set length as appropriate) Preview print menu option (4.1.6, 4.1.4) ---------------------------------------- The Print menu option (id=024) allows the user to print off pages reviewed so far and then return to previewing. If qpr-dialog=a on select-printer call, the print dialogbox will be displayed and if qpr-range=y, the user will be able to select a range of pages to print. If qpr-dialog is not "a", a custom dialogbox will be presented to get the range of pages to be printed. Selecting this option does not effect the option to print all pages when the user exits preview. QPRFON x7/x8 switches for font consistency (4.1.5, 4.1.3, 4.1.0) ---------------------------------------------------------------- Set QPRFON=0000001 in QPR.CFG to turn on new font processing which attempts to minimize variations in a font across printers and operating systems. It does this by selecting fonts so that a certain string of characters fits exactly in an area delimited by the font Width multiplied by the number of characters in the string. The string defaults to the 17 characters "abcdeghknopqsuxyz" but can be reset using the configuration variable QPRSTR. Extra pixels will be added to each character if necessary to match the target width. Set QPRFON=00000011 to also add extra pixels to selected screen characters so that screen (preview) output matches print output more closely. Editor window sizes saved for next session (4.1.2) -------------------------------------------------- Window sizes will be saved between sessions so that it's easier to customize your editing environment. Also saved is the name of the generator template last used so that it's easier to have multiple templates for different purposes. Supplied templates are: uib.cbx - generate default panel copy file and test program qprnofil.cbx - generate as above plus working-storage form definition so no form file is necessary at runtime Cell height increment (4.0.124) ------------------------------- Set the panel Cell height increment property for more finer control of vertical print output. For example, if you want to achieve exactly 10 lines per inch, set Cell height to 9 and Cell height increment to 60. This will give you 96 / 9.60 = 10 lpi when you print. Cell height increment has no effect on screen (preview) output. New QPRDBG setting (4.0.81) --------------------------- Set QPRDBG=4 in QPR.CFG to shows paths of files being used in output QPRDBG file. Form-key values returned from preview (4.0.80) ---------------------------------------------- The following values are returned by the print-page call in form-key: 0 = Preview continued -17 = Cancel -18 = Exit without printing -24 = Exit with printing (new) Copies handling (4.0.79) ------------------------ On return from selecting the printer, qpr-copies will be set to the number of copies to be generated by the printer, unless qpr-allow-copies is set, in which case qpr-copies will be set to the number of copies to be generated by the program. Escape sequences (4.0.72) ------------------------- To send data directly to the printer (bypassing the device driver) define a static field with the X"02" bit of the Miscellaneous property set or a custom field with the X"40" bit of the Miscellaneous property set and the contents of the field will be sent to the printer. To send special characters, insert a backslash (\) followed by the hexadecimal value of the character. For example, the sequence: \1b&a10C\1b&a20Rhello\0d\0a causes "hello" to be printed in the default font at column 10, row 20 on an HP printer. Preview menu options control (4.0.63) ------------------------------------- To suppress a menu option (and the corresponding toolbar icon) in print preview, set the text for the menu option to "N/A" in the QPRPVT file. If the option suppressed is 21 ("Get all pages"), all pages will be automatically retrieved but the user will be allowed to interact with pages retrieved so far as other pages are being retrieved. Long icon file names (4.0.49) ----------------------------- Long file names are now supported for icon fields. In the editor, set the Format property to x(50), for example, and this will cause the Maximum length and Program length properties to be set to 50. This will allow for up to 50 bytes for the icon file name. Because the Program length property has been set, an entry will be generated in the program Fields area for the icon and you can use this entry to change the image that is printed or set the image for individual occurrences in a repeat group. Print dialogbox after preview (4.0.37) -------------------------------------- If QPR-DIALOG is set to "a" on a select-printer or select-printer-ex call prior to a print preview session, the print dialogbox will not be displayed till after the preview session has been exited and pages are to be actually printed. This is particularly useful in connection with the new Range facility (see below). If printing is to be done without preview, "a" means the same as "y" - standard dialogbox display. Print range (4.0.37) -------------------- If QPR-RANGE is set to "y" on a select-printer-ex call, the user will be able to select a range of pages to be printed. Set QPR-RANGE-FROM to the lowest page number that can be entered - normally 1. Set QPR- RANGE-TO to the highest page number that can be entered - this must be estimated if the exact number of pages is not known. These two numbers will be updated to reflect the numbers actually chosen by the user. QPR-RANGE will be reset to low-value if the user chooses to print all pages. The print-page function will check to see if the current page is within the range selected and suppress output if not. If the current page is past the selected range, -21 will be returned in form-KEY to indicate that the remainder of the report need not be generated and end-print may be called immediately. Font change dialogbox (4.0.34) ------------------------------ A custom dialogbox is now used to change a font definition rather than the standard Windows dialogbox. This new dialogbox displays existing font details and allows Width increment to be set (see below). Font width increment (4.0.34) ----------------------------- Allows finer control of printer font width. This is important because printers typically have a much higher resolution (more dots per inch) than video devices. In FormPrint, screen dpi is fixed at 96 pixels. If you want 16 characters per inch, that's fine because you can use a font of 6 (96 / 16 = 6). However, if you want 17 cpi, that's a problem because you can't specify a width with pixel fractions (96 / 17 = 5.6) so you would have to use a width of 5 which would actually give you 19 cpi (96 / 5 = 19.2). Font width increment allows you to specify a pixel fraction for the printer even though this increment cannot be rendered on the screen. For 17 cpi, therefore, you could specify a width of 5 and an increment of 60, which would cause a printer font width of 35 dots to be used on a 600 dpi printer (5.60 * 600 / 96 = 35). Enter font width increment on the Change font dialogbox. QPRFON x1/x2/x3/x4 switches for font control (4.0.34) ----------------------------------------------------- Helps to control font selection. Apart from the x4 switch, these switches are not necessary if using the newer x7/x8 switches (see above). Set QPRFON=xxxx in QPR.CFG where x is 0 (off) or 1 (on) as follows: x1 - 1.x compatibility mode x2 - adjust screen font width before selecting font to pick widest font possible and help with consistent font selection x3 - insert extra spaces between printed characters to achieve best font match in terms of width. This should be set if you are using a font width increment (as described above). x4 - output details of selected fonts to qpr.log file Preview find facility (4.0.33) ------------------------------ A text find facility is available for searching for a text string during preview. Only pages sent to preview facility will be searched so use "Get all pages" first if whole report is to be searched. Search starts at current page. Menu options, etc. related to find facility can be modified in the QPRPVT file as follows: 003~Edit 061Find... F3 908String not found End of Readdoc