home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / PMNEWUP.ZIP / PMNEWUP.XLS < prev    next >
Text File  |  1990-05-13  |  148KB  |  1,642 lines

  1. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page   1
  2. *                                     PMNEWUP.CBL
  3. * Options: GANIM OMF(obj) LITLINK NOASMLIST GNT(PMNEWUP.OBJ)
  4.      1$set ans85 mf noosvs defaultbyte"00" callfh"extfh"                                0
  5.      2*--------------------------------------------------------------*
  6.      3* PMNEWUP.CBL.
  7.      4*
  8.      5* Copyright 1989, Micro Focus Ltd.
  9.      6* Author B J Edwards
  10.      7*--------------------------------------------------------------*
  11.      8                                                                                  0
  12.      9 environment division.                                                          230 000C
  13.     10 special-names.                                                                 230 000C
  14.     11      call-convention 3 is OS2API.                                              230 000C
  15.     12                                                                                230 000C
  16.     13*---------------------------------------------------------------*
  17.     14 input-output section.                                                          230 000C
  18.     15 file-control.                                                                  230 000C
  19.     16     select PmFile assign "pmfile.ism"                                          230 000C
  20.     17     organization is indexed                                                    230 000E
  21.     18     file status is file-status                                                 230 000E
  22.     19     record key is file-record-key                                              230 000E
  23.     20     access is dynamic.                                                         2C3 0010
  24.     21                                                                                2C3 0010
  25.     22******************* DATA DIVISION *******************************
  26.     23 data division.                                                                 2C3 0010
  27.     24                                                                                2C3 0010
  28.     25*---------------------------------------------------------------*
  29.     26 file section.                                                                  2C3 0010
  30.     27 fd  PmFile.                                                                    2C3 0010
  31.     28 01  PmFileRecord.                                                              2C8 0011
  32.     29      03 file-record-key     pic x(5).                                          2C8 0011
  33.     30      03 file-numeric-value  pic 9(4).                                          2CD 0012
  34.     31      03 file-another-1      pic x(20).                                         2D1 0013
  35.     32      03 file-another-2      pic x(20).                                         2E5 0013
  36.     33                                                                                2E5 0014
  37.     34  working-storage section.                                                      2FD 0014
  38.     35                                                                                2FD 0014
  39. *   36  copy "fcf.78".                                                                2FD 0014
  40.     37*************************************************
  41.     38*  Constants Copy file: FCF.78
  42.     39*************************************************
  43.     40     78 FCF-TITLEBAR                      VALUE H"01".                          2FD 0014
  44.     41     78 FCF-SYSMENU                       VALUE H"02".                          300 0014
  45.     42     78 FCF-MENU                          VALUE H"04".                          300 0014
  46.     43     78 FCF-SIZEBORDER                    VALUE H"08".                          300 0014
  47.     44     78 FCF-MINBUTTON                     VALUE H"10".                          300 0014
  48.     45     78 FCF-MAXBUTTON                     VALUE H"20".                          300 0014
  49.     46     78 FCF-MINMAX                        VALUE H"30".                          300 0014
  50.     47     78 FCF-VERTSCROLL                    VALUE H"40".                          300 0014
  51.     48     78 FCF-HORZSCROLL                    VALUE H"80".                          300 0014
  52.     49     78 FCF-DLGBORDER                     VALUE H"0100".                        300 0014
  53.     50     78 FCF-BORDER                        VALUE H"0200".                        300 0014
  54.     51     78 FCF-SHELLPOSITION                 VALUE H"0400".                        300 0014
  55.     52     78 FCF-TASKLIST                      VALUE H"0800".                        300 0014
  56.     53     78 FCF-NOBYTEALIGN                   VALUE H"1000".                        300 0014
  57.     54     78 FCF-NOMOVEWITHOWNER               VALUE H"2000".                        300 0014
  58.     55     78 FCF-ICON                          VALUE H"4000".                        300 0014
  59.     56     78 FCF-ACCELTABLE                    VALUE H"8000".                        300 0014
  60.     57     78 FCF-SYSMODAL                      VALUE H"010000".                      300 0014
  61. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page   2
  62. *                                  PMNEWUP.CBL (FCF.78)
  63.     58     78 FCF-SCREENALIGN                   VALUE H"020000".                      300 0014
  64.     59     78 FCF-MOUSEALIGN                    VALUE H"040000".                      300 0014
  65.     60     78 FCF-PALETTE-NORMAL                VALUE H"080000".                      300 0014
  66.     61     78 FCF-PALETTE-HELP                  VALUE H"100000".                      300 0014
  67.     62     78 FCF-PALETTE-POPUPODD              VALUE H"200000".                      300 0014
  68.     63     78 FCF-PALETTE-POPUPEVEN             VALUE H"400000".                      300 0014
  69.     64     78 FCF-STANDARD                      VALUE H"08CC3F".                      300 0014
  70. *   65  copy "en.78".                                                                 300 0014
  71.     66*************************************************
  72.     67*  Constants Copy file: EN.78
  73.     68*************************************************
  74.     69     78 EN-SETFOCUS                       VALUE H"01".                          300 0014
  75.     70     78 EN-KILLFOCUS                      VALUE H"02".                          300 0014
  76.     71     78 EN-CHANGE                         VALUE H"04".                          300 0014
  77.     72     78 EN-SCROLL                         VALUE H"08".                          300 0014
  78.     73     78 EN-MEMERROR                       VALUE H"10".                          300 0014
  79.     74     78 EN-OVERFLOW                       VALUE H"20".                          300 0014
  80.     75     78 EN-INSERTMODETOGGLE               VALUE H"40".                          300 0014
  81. *   76  copy "em.78".                                                                 300 0014
  82.     77*************************************************
  83.     78*  Constants Copy file: EM.78
  84.     79*************************************************
  85.     80     78 EM-QUERYCHANGED                   VALUE H"0140".                        300 0014
  86.     81     78 EM-QUERYSEL                       VALUE H"0141".                        300 0014
  87.     82     78 EM-SETSEL                         VALUE H"0142".                        300 0014
  88.     83     78 EM-SETTEXTLIMIT                   VALUE H"0143".                        300 0014
  89.     84     78 EM-CUT                            VALUE H"0144".                        300 0014
  90.     85     78 EM-COPY                           VALUE H"0145".                        300 0014
  91.     86     78 EM-CLEAR                          VALUE H"0146".                        300 0014
  92.     87     78 EM-PASTE                          VALUE H"0147".                        300 0014
  93.     88     78 EM-QUERYFIRSTCHAR                 VALUE H"0148".                        300 0014
  94.     89     78 EM-SETFIRSTCHAR                   VALUE H"0149".                        300 0014
  95.     90     78 EM-QUERYREADONLY                  VALUE H"014A".                        300 0014
  96.     91     78 EM-SETREADONLY                    VALUE H"014B".                        300 0014
  97.     92     78 EM-SETINSERTMODE                  VALUE H"014C".                        300 0014
  98. *   93  copy "es.78".                                                                 300 0014
  99.     94*************************************************
  100.     95*  Constants Copy file: ES.78
  101.     96*************************************************
  102.     97     78 ES-LEFT                           VALUE 0.                              300 0014
  103.     98     78 ES-CENTER                         VALUE H"01".                          300 0014
  104.     99     78 ES-RIGHT                          VALUE H"02".                          300 0014
  105.    100     78 ES-AUTOSCROLL                     VALUE H"04".                          300 0014
  106.    101     78 ES-MARGIN                         VALUE H"08".                          300 0014
  107.    102     78 ES-AUTOTAB                        VALUE H"10".                          300 0014
  108.    103     78 ES-READONLY                       VALUE H"20".                          300 0014
  109.    104     78 ES-COMMAND                        VALUE H"40".                          300 0014
  110.    105     78 ES-UNREADABLE                     VALUE H"80".                          300 0014
  111.    106     78 ES-PICTUREMASK                    VALUE H"0100".                        300 0014
  112. *  107  copy "cs.78".                                                                 300 0014
  113.    108*************************************************
  114.    109*  Constants Copy file: CS.78
  115.    110*************************************************
  116.    111     78 CS-MOVENOTIFY                     VALUE H"01".                          300 0014
  117.    112     78 CS-SIZEREDRAW                     VALUE H"04".                          300 0014
  118.    113     78 CS-HITTEST                        VALUE H"08".                          300 0014
  119.    114     78 CS-PUBLIC                         VALUE H"10".                          300 0014
  120.    115     78 CS-FRAME                          VALUE H"20".                          300 0014
  121. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page   3
  122. *                                   PMNEWUP.CBL (CS.78)
  123.    116     78 CS-CLIPCHILDREN                   VALUE H"20000000".                    300 0014
  124.    117     78 CS-CLIPSIBLINGS                   VALUE H"10000000".                    300 0014
  125.    118     78 CS-PARENTCLIP                     VALUE H"08000000".                    300 0014
  126.    119     78 CS-SAVEBITS                       VALUE H"04000000".                    300 0014
  127.    120     78 CS-SYNCPAINT                      VALUE H"02000000".                    300 0014
  128. *  121  copy "wc.78".                                                                 300 0014
  129.    122*************************************************
  130.    123*  Constants Copy file: WC.78
  131.    124*************************************************
  132.    125     78 WC-STATIC                         VALUE H"FFFF0005".                    300 0014
  133.    126     78 WC-BUTTON                         VALUE H"FFFF0003".                    300 0014
  134.    127     78 WC-COMBOBOX                       VALUE H"FFFF0002".                    300 0014
  135.    128     78 WC-ENTRYFIELD                     VALUE H"FFFF0006".                    300 0014
  136.    129     78 WC-MLE                            VALUE H"FFFF000A".                    300 0014
  137.    130     78 WC-LISTBOX                        VALUE H"FFFF0007".                    300 0014
  138.    131     78 WC-MENU                           VALUE H"FFFF0004".                    300 0014
  139.    132     78 WC-SCROLLBAR                      VALUE H"FFFF0008".                    300 0014
  140.    133     78 WC-FRAME                          VALUE H"FFFF0001".                    300 0014
  141.    134     78 WC-TITLEBAR                       VALUE H"FFFF0009".                    300 0014
  142. *  135  copy "mb.78".                                                                 300 0014
  143.    136*************************************************
  144.    137*  Constants Copy file: MB.78
  145.    138*************************************************
  146.    139     78 MB-OK                             VALUE 0.                              300 0014
  147.    140     78 MB-OKCANCEL                       VALUE H"01".                          300 0014
  148.    141     78 MB-RETRYCANCEL                    VALUE H"02".                          300 0014
  149.    142     78 MB-ABORTRETRYIGNORE               VALUE H"03".                          300 0014
  150.    143     78 MB-YESNO                          VALUE H"04".                          300 0014
  151.    144     78 MB-YESNOCANCEL                    VALUE H"05".                          300 0014
  152.    145     78 MB-CANCEL                         VALUE H"06".                          300 0014
  153.    146     78 MB-ENTER                          VALUE H"07".                          300 0014
  154.    147     78 MB-ENTERCANCEL                    VALUE H"08".                          300 0014
  155.    148     78 MB-NOICON                         VALUE 0.                              300 0014
  156.    149     78 MB-CUANOTIFICATION                VALUE 0.                              300 0014
  157.    150     78 MB-ICONQUESTION                   VALUE H"10".                          300 0014
  158.    151     78 MB-ICONEXCLAMATION                VALUE H"20".                          300 0014
  159.    152     78 MB-CUAWARNING                     VALUE H"20".                          300 0014
  160.    153     78 MB-ICONASTERISK                   VALUE H"30".                          300 0014
  161.    154     78 MB-ICONHAND                       VALUE H"40".                          300 0014
  162.    155     78 MB-CUACRITICAL                    VALUE H"40".                          300 0014
  163.    156     78 MB-QUERY                          VALUE H"10".                          300 0014
  164.    157     78 MB-WARNING                        VALUE H"20".                          300 0014
  165.    158     78 MB-INFORMATION                    VALUE H"30".                          300 0014
  166.    159     78 MB-CRITICAL                       VALUE H"40".                          300 0014
  167.    160     78 MB-ERROR                          VALUE H"40".                          300 0014
  168.    161     78 MB-DEFBUTTON1                     VALUE 0.                              300 0014
  169.    162     78 MB-DEFBUTTON2                     VALUE H"0100".                        300 0014
  170.    163     78 MB-DEFBUTTON3                     VALUE H"0200".                        300 0014
  171.    164     78 MB-APPLMODAL                      VALUE 0.                              300 0014
  172.    165     78 MB-SYSTEMMODAL                    VALUE H"1000".                        300 0014
  173.    166     78 MB-HELP                           VALUE H"2000".                        300 0014
  174.    167     78 MB-MOVEABLE                       VALUE H"4000".                        300 0014
  175. *  168  copy "wm.78".                                                                 300 0014
  176.    169*************************************************
  177.    170*  Constants Copy file: WM.78
  178.    171*************************************************
  179.    172     78 WM-NULL                           VALUE 0.                              300 0014
  180.    173     78 WM-CREATE                         VALUE H"01".                          300 0014
  181. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page   4
  182. *                                   PMNEWUP.CBL (WM.78)
  183.    174     78 WM-DESTROY                        VALUE H"02".                          300 0014
  184.    175     78 WM-OTHERWINDOWDESTROYED           VALUE H"03".                          300 0014
  185.    176     78 WM-ENABLE                         VALUE H"04".                          300 0014
  186.    177     78 WM-SHOW                           VALUE H"05".                          300 0014
  187.    178     78 WM-MOVE                           VALUE H"06".                          300 0014
  188.    179     78 WM-SIZE                           VALUE H"07".                          300 0014
  189.    180     78 WM-ADJUSTWINDOWPOS                VALUE H"08".                          300 0014
  190.    181     78 WM-CALCVALIDRECTS                 VALUE H"09".                          300 0014
  191.    182     78 WM-SETWINDOWPARAMS                VALUE H"0A".                          300 0014
  192.    183     78 WM-QUERYWINDOWPARAMS              VALUE H"0B".                          300 0014
  193.    184     78 WM-HITTEST                        VALUE H"0C".                          300 0014
  194.    185     78 WM-ACTIVATE                       VALUE H"0D".                          300 0014
  195.    186     78 WM-SETFOCUS                       VALUE H"0F".                          300 0014
  196.    187     78 WM-SETSELECTION                   VALUE H"10".                          300 0014
  197.    188     78 WM-PPAINT                         VALUE H"11".                          300 0014
  198.    189     78 WM-PSETFOCUS                      VALUE H"12".                          300 0014
  199.    190     78 WM-PSYSCOLORCHANGE                VALUE H"13".                          300 0014
  200.    191     78 WM-PSIZE                          VALUE H"14".                          300 0014
  201.    192     78 WM-PACTIVATE                      VALUE H"15".                          300 0014
  202.    193     78 WM-PCONTROL                       VALUE H"16".                          300 0014
  203.    194     78 WM-COMMAND                        VALUE H"20".                          300 0014
  204.    195     78 WM-SYSCOMMAND                     VALUE H"21".                          300 0014
  205.    196     78 WM-HELP                           VALUE H"22".                          300 0014
  206.    197     78 WM-PAINT                          VALUE H"23".                          300 0014
  207.    198     78 WM-TIMER                          VALUE H"24".                          300 0014
  208.    199     78 WM-SEM1                           VALUE H"25".                          300 0014
  209.    200     78 WM-SEM2                           VALUE H"26".                          300 0014
  210.    201     78 WM-SEM3                           VALUE H"27".                          300 0014
  211.    202     78 WM-SEM4                           VALUE H"28".                          300 0014
  212.    203     78 WM-CLOSE                          VALUE H"29".                          300 0014
  213.    204     78 WM-QUIT                           VALUE H"2A".                          300 0014
  214.    205     78 WM-SYSCOLORCHANGE                 VALUE H"2B".                          300 0014
  215.    206     78 WM-SYSVALUECHANGED                VALUE H"2D".                          300 0014
  216.    207     78 WM-APPTERMINATENOTIFY             VALUE H"2E".                          300 0014
  217.    208     78 WM-PRESPARAMCHANGED               VALUE H"2F".                          300 0014
  218.    209     78 WM-CONTROL                        VALUE H"30".                          300 0014
  219.    210     78 WM-VSCROLL                        VALUE H"31".                          300 0014
  220.    211     78 WM-HSCROLL                        VALUE H"32".                          300 0014
  221.    212     78 WM-INITMENU                       VALUE H"33".                          300 0014
  222.    213     78 WM-MENUSELECT                     VALUE H"34".                          300 0014
  223.    214     78 WM-MENUEND                        VALUE H"35".                          300 0014
  224.    215     78 WM-DRAWITEM                       VALUE H"36".                          300 0014
  225.    216     78 WM-MEASUREITEM                    VALUE H"37".                          300 0014
  226.    217     78 WM-CONTROLPOINTER                 VALUE H"38".                          300 0014
  227.    218     78 WM-CONTROLHEAP                    VALUE H"39".                          300 0014
  228.    219     78 WM-QUERYDLGCODE                   VALUE H"3A".                          300 0014
  229.    220     78 WM-INITDLG                        VALUE H"3B".                          300 0014
  230.    221     78 WM-SUBSTITUTESTRING               VALUE H"3C".                          300 0014
  231.    222     78 WM-MATCHMNEMONIC                  VALUE H"3D".                          300 0014
  232.    223     78 WM-SAVEAPPLICATION                VALUE H"3E".                          300 0014
  233.    224     78 WM-HELPBASE                       VALUE H"0F00".                        300 0014
  234.    225     78 WM-HELPTOP                        VALUE H"0FFF".                        300 0014
  235.    226     78 WM-USER                           VALUE H"1000".                        300 0014
  236.    227     78 WM-MOUSEFIRST                     VALUE H"70".                          300 0014
  237.    228     78 WM-MOUSELAST                      VALUE H"79".                          300 0014
  238.    229     78 WM-BUTTONCLICKFIRST               VALUE H"71".                          300 0014
  239.    230     78 WM-BUTTONCLICKLAST                VALUE H"79".                          300 0014
  240.    231     78 WM-MOUSEMOVE                      VALUE H"70".                          300 0014
  241. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page   5
  242. *                                   PMNEWUP.CBL (WM.78)
  243.    232     78 WM-BUTTON1DOWN                    VALUE H"71".                          300 0014
  244.    233     78 WM-BUTTON1UP                      VALUE H"72".                          300 0014
  245.    234     78 WM-BUTTON1DBLCLK                  VALUE H"73".                          300 0014
  246.    235     78 WM-BUTTON2DOWN                    VALUE H"74".                          300 0014
  247.    236     78 WM-BUTTON2UP                      VALUE H"75".                          300 0014
  248.    237     78 WM-BUTTON2DBLCLK                  VALUE H"76".                          300 0014
  249.    238     78 WM-BUTTON3DOWN                    VALUE H"77".                          300 0014
  250.    239     78 WM-BUTTON3UP                      VALUE H"78".                          300 0014
  251.    240     78 WM-BUTTON3DBLCLK                  VALUE H"79".                          300 0014
  252.    241     78 WM-CHAR                           VALUE H"7A".                          300 0014
  253.    242     78 WM-VIOCHAR                        VALUE H"7B".                          300 0014
  254.    243     78 WM-JOURNALNOTIFY                  VALUE H"7C".                          300 0014
  255.    244     78 WM-FLASHWINDOW                    VALUE H"40".                          300 0014
  256.    245     78 WM-FORMATFRAME                    VALUE H"41".                          300 0014
  257.    246     78 WM-UPDATEFRAME                    VALUE H"42".                          300 0014
  258.    247     78 WM-FOCUSCHANGE                    VALUE H"43".                          300 0014
  259.    248     78 WM-SETBORDERSIZE                  VALUE H"44".                          300 0014
  260.    249     78 WM-TRACKFRAME                     VALUE H"45".                          300 0014
  261.    250     78 WM-MINMAXFRAME                    VALUE H"46".                          300 0014
  262.    251     78 WM-SETICON                        VALUE H"47".                          300 0014
  263.    252     78 WM-QUERYICON                      VALUE H"48".                          300 0014
  264.    253     78 WM-SETACCELTABLE                  VALUE H"49".                          300 0014
  265.    254     78 WM-QUERYACCELTABLE                VALUE H"4A".                          300 0014
  266.    255     78 WM-TRANSLATEACCEL                 VALUE H"4B".                          300 0014
  267.    256     78 WM-QUERYTRACKINFO                 VALUE H"4C".                          300 0014
  268.    257     78 WM-QUERYBORDERSIZE                VALUE H"4D".                          300 0014
  269.    258     78 WM-NEXTMENU                       VALUE H"4E".                          300 0014
  270.    259     78 WM-ERASEBACKGROUND                VALUE H"4F".                          300 0014
  271.    260     78 WM-QUERYFRAMEINFO                 VALUE H"50".                          300 0014
  272.    261     78 WM-QUERYFOCUSCHAIN                VALUE H"51".                          300 0014
  273.    262     78 WM-CALCFRAMERECT                  VALUE H"53".                          300 0014
  274.    263     78 WM-WINDOWPOSCHANGED               VALUE H"55".                          300 0014
  275.    264     78 WM-QUERYFRAMECTLCOUNT             VALUE H"59".                          300 0014
  276.    265     78 WM-QUERYHELPINFO                  VALUE H"5B".                          300 0014
  277.    266     78 WM-SETHELPINFO                    VALUE H"5C".                          300 0014
  278.    267     78 WM-ERROR                          VALUE H"5D".                          300 0014
  279.    268     78 WM-RENDERFMT                      VALUE H"60".                          300 0014
  280.    269     78 WM-RENDERALLFMTS                  VALUE H"61".                          300 0014
  281.    270     78 WM-DESTROYCLIPBOARD               VALUE H"62".                          300 0014
  282.    271     78 WM-PAINTCLIPBOARD                 VALUE H"63".                          300 0014
  283.    272     78 WM-SIZECLIPBOARD                  VALUE H"64".                          300 0014
  284.    273     78 WM-HSCROLLCLIPBOARD               VALUE H"65".                          300 0014
  285.    274     78 WM-VSCROLLCLIPBOARD               VALUE H"66".                          300 0014
  286.    275     78 WM-DRAWCLIPBOARD                  VALUE H"67".                          300 0014
  287.    276     78 WM-DDE-FIRST                      VALUE H"A0".                          300 0014
  288.    277     78 WM-DDE-INITIATE                   VALUE H"A0".                          300 0014
  289.    278     78 WM-DDE-REQUEST                    VALUE H"A1".                          300 0014
  290.    279     78 WM-DDE-ACK                        VALUE H"A2".                          300 0014
  291.    280     78 WM-DDE-DATA                       VALUE H"A3".                          300 0014
  292.    281     78 WM-DDE-ADVISE                     VALUE H"A4".                          300 0014
  293.    282     78 WM-DDE-UNADVISE                   VALUE H"A5".                          300 0014
  294.    283     78 WM-DDE-POKE                       VALUE H"A6".                          300 0014
  295.    284     78 WM-DDE-EXECUTE                    VALUE H"A7".                          300 0014
  296.    285     78 WM-DDE-TERMINATE                  VALUE H"A8".                          300 0014
  297.    286     78 WM-DDE-INITIATEACK                VALUE H"A9".                          300 0014
  298.    287     78 WM-DDE-LAST                       VALUE H"AF".                          300 0014
  299.    288     78 WM-QUERYCONVERTPOS                VALUE H"B0".                          300 0014
  300. *  289  copy "ws.78".                                                                 300 0014
  301. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page   6
  302. *                                   PMNEWUP.CBL (WS.78)
  303.    290*************************************************
  304.    291*  Constants Copy file: WS.78
  305.    292*************************************************
  306.    293     78 WS-VISIBLE                        VALUE H"80000000".                    300 0014
  307.    294     78 WS-DISABLED                       VALUE H"40000000".                    300 0014
  308.    295     78 WS-CLIPCHILDREN                   VALUE H"20000000".                    300 0014
  309.    296     78 WS-CLIPSIBLINGS                   VALUE H"10000000".                    300 0014
  310.    297     78 WS-PARENTCLIP                     VALUE H"08000000".                    300 0014
  311.    298     78 WS-SAVEBITS                       VALUE H"04000000".                    300 0014
  312.    299     78 WS-SYNCPAINT                      VALUE H"02000000".                    300 0014
  313.    300     78 WS-MINIMIZED                      VALUE H"01000000".                    300 0014
  314.    301     78 WS-MAXIMIZED                      VALUE H"800000".                      300 0014
  315.    302     78 WS-GROUP                          VALUE H"010000".                      300 0014
  316.    303     78 WS-TABSTOP                        VALUE H"020000".                      300 0014
  317.    304     78 WS-MULTISELECT                    VALUE H"040000".                      300 0014
  318. *  305  copy "vk.78".                                                                 300 0014
  319.    306*************************************************
  320.    307*  Constants Copy file: VK.78
  321.    308*************************************************
  322.    309     78 VK-BUTTON1                        VALUE H"01".                          300 0014
  323.    310     78 VK-BUTTON2                        VALUE H"02".                          300 0014
  324.    311     78 VK-BUTTON3                        VALUE H"03".                          300 0014
  325.    312     78 VK-BREAK                          VALUE H"04".                          300 0014
  326.    313     78 VK-BACKSPACE                      VALUE H"05".                          300 0014
  327.    314     78 VK-TAB                            VALUE H"06".                          300 0014
  328.    315     78 VK-BACKTAB                        VALUE H"07".                          300 0014
  329.    316     78 VK-NEWLINE                        VALUE H"08".                          300 0014
  330.    317     78 VK-SHIFT                          VALUE H"09".                          300 0014
  331.    318     78 VK-CTRL                           VALUE H"0A".                          300 0014
  332.    319     78 VK-ALT                            VALUE H"0B".                          300 0014
  333.    320     78 VK-ALTGRAF                        VALUE H"0C".                          300 0014
  334.    321     78 VK-PAUSE                          VALUE H"0D".                          300 0014
  335.    322     78 VK-CAPSLOCK                       VALUE H"0E".                          300 0014
  336.    323     78 VK-ESC                            VALUE H"0F".                          300 0014
  337.    324     78 VK-SPACE                          VALUE H"10".                          300 0014
  338.    325     78 VK-PAGEUP                         VALUE H"11".                          300 0014
  339.    326     78 VK-PAGEDOWN                       VALUE H"12".                          300 0014
  340.    327     78 VK-END                            VALUE H"13".                          300 0014
  341.    328     78 VK-HOME                           VALUE H"14".                          300 0014
  342.    329     78 VK-LEFT                           VALUE H"15".                          300 0014
  343.    330     78 VK-UP                             VALUE H"16".                          300 0014
  344.    331     78 VK-RIGHT                          VALUE H"17".                          300 0014
  345.    332     78 VK-DOWN                           VALUE H"18".                          300 0014
  346.    333     78 VK-PRINTSCRN                      VALUE H"19".                          300 0014
  347.    334     78 VK-INSERT                         VALUE H"1A".                          300 0014
  348.    335     78 VK-DELETE                         VALUE H"1B".                          300 0014
  349.    336     78 VK-SCRLLOCK                       VALUE H"1C".                          300 0014
  350.    337     78 VK-NUMLOCK                        VALUE H"1D".                          300 0014
  351.    338     78 VK-ENTER                          VALUE H"1E".                          300 0014
  352.    339     78 VK-SYSRQ                          VALUE H"1F".                          300 0014
  353.    340     78 VK-F1                             VALUE H"20".                          300 0014
  354.    341     78 VK-F2                             VALUE H"21".                          300 0014
  355.    342     78 VK-F3                             VALUE H"22".                          300 0014
  356.    343     78 VK-F4                             VALUE H"23".                          300 0014
  357.    344     78 VK-F5                             VALUE H"24".                          300 0014
  358.    345     78 VK-F6                             VALUE H"25".                          300 0014
  359.    346     78 VK-F7                             VALUE H"26".                          300 0014
  360.    347     78 VK-F8                             VALUE H"27".                          300 0014
  361. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page   7
  362. *                                   PMNEWUP.CBL (VK.78)
  363.    348     78 VK-F9                             VALUE H"28".                          300 0014
  364.    349     78 VK-F10                            VALUE H"29".                          300 0014
  365.    350     78 VK-F11                            VALUE H"2A".                          300 0014
  366.    351     78 VK-F12                            VALUE H"2B".                          300 0014
  367.    352     78 VK-F13                            VALUE H"2C".                          300 0014
  368.    353     78 VK-F14                            VALUE H"2D".                          300 0014
  369.    354     78 VK-F15                            VALUE H"2E".                          300 0014
  370.    355     78 VK-F16                            VALUE H"2F".                          300 0014
  371.    356     78 VK-F17                            VALUE H"30".                          300 0014
  372.    357     78 VK-F18                            VALUE H"31".                          300 0014
  373.    358     78 VK-F19                            VALUE H"32".                          300 0014
  374.    359     78 VK-F20                            VALUE H"33".                          300 0014
  375.    360     78 VK-F21                            VALUE H"34".                          300 0014
  376.    361     78 VK-F22                            VALUE H"35".                          300 0014
  377.    362     78 VK-F23                            VALUE H"36".                          300 0014
  378.    363     78 VK-F24                            VALUE H"37".                          300 0014
  379.    364     78 VK-MENU                           VALUE H"29".                          300 0014
  380.    365     78 VK-USERFIRST                      VALUE H"0100".                        300 0014
  381.    366     78 VK-USERLAST                       VALUE H"01FF".                        300 0014
  382. *  367  copy "qw.78".                                                                 300 0014
  383.    368*************************************************
  384.    369*  Constants Copy file: QW.78
  385.    370*************************************************
  386.    371     78 QW-NEXT                           VALUE 0.                              300 0014
  387.    372     78 QW-PREV                           VALUE 1.                              300 0014
  388.    373     78 QW-TOP                            VALUE 2.                              300 0014
  389.    374     78 QW-BOTTOM                         VALUE 3.                              300 0014
  390.    375     78 QW-OWNER                          VALUE 4.                              300 0014
  391.    376     78 QW-PARENT                         VALUE 5.                              300 0014
  392.    377     78 QW-NEXTTOP                        VALUE 6.                              300 0014
  393.    378     78 QW-PREVTOP                        VALUE 7.                              300 0014
  394.    379     78 QW-FRAMEOWNER                     VALUE 8.                              300 0014
  395. *  380  copy "swp.78".                                                                300 0014
  396.    381*************************************************
  397.    382*  Constants Copy file: SWP.78
  398.    383*************************************************
  399.    384     78 SWP-SIZE                          VALUE H"01".                          300 0014
  400.    385     78 SWP-MOVE                          VALUE H"02".                          300 0014
  401.    386     78 SWP-ZORDER                        VALUE H"04".                          300 0014
  402.    387     78 SWP-SHOW                          VALUE H"08".                          300 0014
  403.    388     78 SWP-HIDE                          VALUE H"10".                          300 0014
  404.    389     78 SWP-NOREDRAW                      VALUE H"20".                          300 0014
  405.    390     78 SWP-NOADJUST                      VALUE H"40".                          300 0014
  406.    391     78 SWP-ACTIVATE                      VALUE H"80".                          300 0014
  407.    392     78 SWP-DEACTIVATE                    VALUE H"0100".                        300 0014
  408.    393     78 SWP-EXTSTATECHANGE                VALUE H"0200".                        300 0014
  409.    394     78 SWP-MINIMIZE                      VALUE H"0400".                        300 0014
  410.    395     78 SWP-MAXIMIZE                      VALUE H"0800".                        300 0014
  411.    396     78 SWP-RESTORE                       VALUE H"1000".                        300 0014
  412.    397     78 SWP-FOCUSACTIVATE                 VALUE H"2000".                        300 0014
  413.    398     78 SWP-FOCUSDEACTIVATE               VALUE H"4000".                        300 0014
  414. *  399  copy "fid.78".                                                                300 0014
  415.    400*************************************************
  416.    401*  Constants Copy file: FID.78
  417.    402*************************************************
  418.    403     78 FID-SYSMENU                       VALUE H"8002".                        300 0014
  419.    404     78 FID-TITLEBAR                      VALUE H"8003".                        300 0014
  420.    405     78 FID-MINMAX                        VALUE H"8004".                        300 0014
  421. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page   8
  422. *                                  PMNEWUP.CBL (FID.78)
  423.    406     78 FID-MENU                          VALUE H"8005".                        300 0014
  424.    407     78 FID-VERTSCROLL                    VALUE H"8006".                        300 0014
  425.    408     78 FID-HORZSCROLL                    VALUE H"8007".                        300 0014
  426.    409     78 FID-CLIENT                        VALUE H"8008".                        300 0014
  427.    410     78 FID-DBE-APPSTAT                   VALUE H"8010".                        300 0014
  428.    411     78 FID-DBE-KBDSTAT                   VALUE H"8011".                        300 0014
  429.    412     78 FID-DBE-PECIC                     VALUE H"8012".                        300 0014
  430.    413     78 FID-DBE-KKPOPUP                   VALUE H"8013".                        300 0014
  431. *  414  copy "mbid.78".                                                               300 0014
  432.    415*************************************************
  433.    416*  Constants Copy file: MBID.78
  434.    417*************************************************
  435.    418     78 MBID-OK                           VALUE 1.                              300 0014
  436.    419     78 MBID-CANCEL                       VALUE 2.                              300 0014
  437.    420     78 MBID-ABORT                        VALUE 3.                              300 0014
  438.    421     78 MBID-RETRY                        VALUE 4.                              300 0014
  439.    422     78 MBID-IGNORE                       VALUE 5.                              300 0014
  440.    423     78 MBID-YES                          VALUE 6.                              300 0014
  441.    424     78 MBID-NO                           VALUE 7.                              300 0014
  442.    425     78 MBID-HELP                         VALUE 8.                              300 0014
  443.    426     78 MBID-ENTER                        VALUE 9.                              300 0014
  444.    427     78 MBID-ERROR                        VALUE H"FFFF".                        300 0014
  445. *  428  copy "hwnd.78".                                                               300 0014
  446.    429*************************************************
  447.    430*  Constants Copy file: HWND.78
  448.    431*************************************************
  449.    432     78 HWND-DESKTOP                      VALUE 1.                              300 0014
  450.    433     78 HWND-OBJECT                       VALUE 2.                              300 0014
  451.    434     78 HWND-TOP                          VALUE 3.                              300 0014
  452.    435     78 HWND-BOTTOM                       VALUE 4.                              300 0014
  453.    436     78 HWND-THREADCAPTURE                VALUE 5.                              300 0014
  454.    437     78 HWND-PARENT                       VALUE 0.                              300 0014
  455. *  438  copy "sptr.78".                                                               300 0014
  456.    439*************************************************
  457.    440*  Constants Copy file: SPTR.78
  458.    441*************************************************
  459.    442     78 SPTR-ARROW                        VALUE 1.                              300 0014
  460.    443     78 SPTR-TEXT                         VALUE 2.                              300 0014
  461.    444     78 SPTR-WAIT                         VALUE 3.                              300 0014
  462.    445     78 SPTR-SIZE                         VALUE 4.                              300 0014
  463.    446     78 SPTR-MOVE                         VALUE 5.                              300 0014
  464.    447     78 SPTR-SIZENWSE                     VALUE 6.                              300 0014
  465.    448     78 SPTR-SIZENESW                     VALUE 7.                              300 0014
  466.    449     78 SPTR-SIZEWE                       VALUE 8.                              300 0014
  467.    450     78 SPTR-SIZENS                       VALUE 9.                              300 0014
  468.    451     78 SPTR-APPICON                      VALUE 10.                             300 0014
  469.    452     78 SPTR-ICONINFORMATION              VALUE 11.                             300 0014
  470.    453     78 SPTR-ICONQUESTION                 VALUE 12.                             300 0014
  471.    454     78 SPTR-ICONERROR                    VALUE 13.                             300 0014
  472.    455     78 SPTR-ICONWARNING                  VALUE 14.                             300 0014
  473.    456     78 SPTR-CPTR                         VALUE 14.                             300 0014
  474.    457     78 SPTR-ILLEGAL                      VALUE 18.                             300 0014
  475.    458     78 SPTR-FILE                         VALUE 19.                             300 0014
  476.    459     78 SPTR-FOLDER                       VALUE 20.                             300 0014
  477.    460     78 SPTR-MULTFILE                     VALUE 21.                             300 0014
  478.    461     78 SPTR-PROGRAM                      VALUE 22.                             300 0014
  479.    462     78 SPTR-HANDICON                     VALUE 13.                             300 0014
  480.    463     78 SPTR-QUESICON                     VALUE 12.                             300 0014
  481. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page   9
  482. *                                  PMNEWUP.CBL (SPTR.78)
  483.    464     78 SPTR-BANGICON                     VALUE 14.                             300 0014
  484.    465     78 SPTR-NOTEICON                     VALUE 11.                             300 0014
  485. *  466  copy "cursor.78".                                                             300 0014
  486.    467*************************************************
  487.    468*  Constants Copy file: CURSOR.78
  488.    469*************************************************
  489.    470     78 CURSOR-SOLID                      VALUE 0.                              300 0014
  490.    471     78 CURSOR-HALFTONE                   VALUE H"01".                          300 0014
  491.    472     78 CURSOR-FRAME                      VALUE H"02".                          300 0014
  492.    473     78 CURSOR-FLASH                      VALUE H"04".                          300 0014
  493.    474     78 CURSOR-SETPOS                     VALUE H"8000".                        300 0014
  494.    475                                                                                300 0014
  495.    476****************************************************************
  496. *  477  copy "pmnewup.cpy".                                                           300 0014
  497.    478 78 ID-RESOURCE    VALUE 1.                                                     300 0014
  498.    479                                                                                300 0014
  499.    480 78 IDM-FILE       VALUE 1.                                                     300 0014
  500.    481 78 IDM-TOPEXIT    VALUE 2.                                                     300 0014
  501.    482 78 IDM-HELP       VALUE 3.                                                     300 0014
  502.    483                                                                                300 0014
  503.    484 78 IDM-READ       VALUE 10.                                                    300 0014
  504.    485 78 IDM-DELETE     VALUE 11.                                                    300 0014
  505.    486 78 IDM-WRITE      VALUE 12.                                                    300 0014
  506.    487 78 IDM-REWRITE    VALUE 13.                                                    300 0014
  507.    488 78 IDM-PREVIOUS   VALUE 14.                                                    300 0014
  508.    489 78 IDM-NEXT       VALUE 15.                                                    300 0014
  509.    490 78 IDM-CLEAR      VALUE 16.                                                    300 0014
  510.    491                                                                                300 0014
  511.    492 78 IDM-EXIT       VALUE 40.                                                    300 0014
  512.    493 78 IDM-RESUME     VALUE 41.                                                    300 0014
  513.    494****************************************************************
  514.    495  78  object-id-1         value 999.                                            300 0014
  515.    496  78  object-id-2         value 998.                                            300 0014
  516.    497  78  object-id-3         value 997.                                            300 0014
  517.    498  78  object-id-4         value 996.                                            300 0014
  518.    499                                                                                300 0014
  519.    500  77  MY-MB               pic 9(4) comp-5.                                      300 0015 00
  520.    501  77  object-flag         pic 99 comp-5 value 0.                                308 0016 01
  521.    502  77  msg-box-answer      pic 9(4) comp-5.                                      310 0017 02
  522.    503                                                                                312 0017 02
  523.    504  01  file-status         pic xx.                                               318 0017 02
  524.    505                                                                                318 0018 03
  525.    506  01  entry-field-contents.                                                     320 0019 04
  526.    507                                                                                320 0019 04
  527.    508    78 field-1-start value NEXT.                                                320 0019 04
  528.    509      03 entry-field-1         pic x(5).                                        320 0019 04
  529.    510    78 size-of-field-1 value NEXT - field-1-start.                              325 0019 04
  530.    511                                                                                325 0019 04
  531.    512      03 filler                pic x value x"00".                               325 0019 04
  532.    513                                                                                325 001A 05
  533.    514    78 field-2-start value NEXT.                                                326
  534.    515      03 entry-field-2         pic 9(4).                                        326 001A 05
  535.    516    78 size-of-field-2 value NEXT - field-2-start.                              32A 001A 05
  536.    517      03 entry-field-2-x redefines entry-field-2 pic x(4).                      32A 001A 05
  537.    518                                                                                326 001A 05
  538.    519      03 filler                pic x value x"00".                               32A 001A 05
  539.    520                                                                                32A 001B 06
  540.    521    78 field-3-start value NEXT.                                                32B
  541. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  10
  542. *                                     PMNEWUP.CBL
  543.    522      03 entry-field-3         pic x(20).                                       32B 001B 06
  544.    523    78 size-of-field-3 value NEXT - field-3-start.                              33F 001B 06
  545.    524                                                                                33F 001B 06
  546.    525      03 filler                pic x value x"00".                               33F 001B 06
  547.    526                                                                                33F 001C 07
  548.    527    78 field-4-start value NEXT.                                                340
  549.    528      03 entry-field-4         pic x(20).                                       340 001C 07
  550.    529    78 size-of-field-4 value NEXT - field-4-start.                              354 001C 07
  551.    530      03 filler                pic x value x"00".                               354 001C 07
  552.    531                                                                                354 001D 08
  553.    532  78 valid-new-msg         value "Record written..........".                    355
  554.    533  78 valid-load-msg        value "Record read.............".                    355
  555.    534  78 valid-delete-msg      value "Record deleted..........".                    355
  556.    535  78 valid-overwrite-msg   value "Record rewritten........".                    355
  557.    536  78 not-deleted-msg       value "Record not deleted......".                    355
  558.    537                                                                                355
  559.    538  78 invalid-new-msg       value "ERROR: Record exists..........".              355
  560.    539  78 invalid-load-msg      value "ERROR: Record not found.......".              355
  561.    540  78 invalid-delete-msg    value "ERROR: Record not present.....".              355
  562.    541  78 invalid-overwrite-msg value "ERROR: Record not present.....".              355
  563.    542  78 invalid-key-msg       value "ERROR: Record key empty.......".              355
  564.    543                                                                                355
  565.    544  78 delete-msg-confirm    value "Delete. Are you sure?".                       355
  566.    545                                                                                355
  567.    546  01 No-help-yet-message.                                                       358 001D 08
  568.    547     03   pic x(42)                                                             358 001D 08
  569.    548        value "This program is written using Micro Focus ".                     358 001D 08
  570.    549     03   pic x(40)                                                             382
  571.    550        value "COBOL/2. The source for this program is ".                       382 001E 09
  572.    551     03   pic x(42)                                                             3AA
  573.    552        value "available in the program PMNEWUP.CBL. The ".                     3AA 001E 09
  574.    553     03   pic x(40)                                                             3D4
  575.    554        value "program was written by B J Edwards.".                            3D4 001E 09
  576.    555     03   pic x     value x"00".                                                3FC
  577.    556                                                                                3FC 001E 09
  578.    557  01  end-message.                                                              400 001E 09
  579.    558     03   pic x(40) value "Do you really want to end?".                         400 001E 09
  580.    559     03   pic x     value x"00".                                                428
  581.    560                                                                                428 001F 0A
  582.    561  78 no-numerics-msg       value "Numeric Characters not allowed".              429
  583.    562  78 numerics-only-msg     value "Numeric Characters only".                     429
  584.    563                                                                                429
  585.    564  01  work-data.                                                                430 001F 0A
  586.    565      03 hab                 pic 9(9) comp-5.                                   430 001F 0A
  587.    566      03 hmq                 pic 9(9) comp-5.                                   434 0020 0B
  588.    567      03 hwndClient          pic 9(9) comp-5.                                   438 0021 0C
  589.    568      03 hwndFrame           pic 9(9) comp-5.                                   43C 0022 0D
  590.    569      03 hwndParent          pic 9(9) comp-5.                                   440 0023 0E
  591.    570      03 hwndMenu            pic 9(9) comp-5.                                   444 0024 0F
  592.    571      03 hwndEntryField      pic xxxx comp-5.                                   448 0025 10
  593.    572      03 hwndEntryField-1    pic xxxx comp-5.                                   44C 0026 11
  594.    573      03 hwndEntryField-2    pic xxxx comp-5.                                   450 0027 12
  595.    574      03 hwndEntryField-3    pic xxxx comp-5.                                   454 0028 13
  596.    575      03 hwndEntryField-4    pic xxxx comp-5.                                   458 0029 14
  597.    576      03 nullText            pic x  value x"00".                                45C 002A 15
  598.    577      03 ClientWndProc       procedure-pointer.                                 45D 002A 15
  599.    578      03 temp-long           pic 9(9) comp-5.                                   461 002C 17
  600.    579      03 EntryFieldWinProc  redefines temp-long procedure-pointer.              461 002C 17
  601. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  11
  602. *                                     PMNEWUP.CBL
  603.    580      03 DefEntryFieldWinProc                                                   461 002C 17
  604.    581                   REDEFINES temp-long procedure-pointer.                       461 002C 17
  605.    582      03 qmsg.                                                                  465 002D 18
  606.    583         05  qmsghwnd        pic 9(9) comp-5.                                   465 002D 18
  607.    584         05  qmsgmsg         pic 9(4) comp-5.                                   469 002E 19
  608.    585         05  qmsgmp1         pic 9(9) comp-5.                                   46B 002F 1A
  609.    586         05  qmsgmp2         pic 9(9) comp-5.                                   46F 0030 1B
  610.    587         05  qmsgtime        pic 9(9) comp-5.                                   473 0031 1C
  611.    588         05  qmsgptl.                                                           477 0032 1D
  612.    589             07  qmsgptlx    pic 9(9) comp-5.                                   477 0032 1D
  613.    590             07  qmsgptly    pic 9(9) comp-5.                                   47B 0033 1E
  614.    591      03 loop-flag           pic x value 'C'.                                   47F 0034 1F
  615.    592         88  loop-end            value 'E'.                                     480 0034 1F
  616.    593      03 bool                pic 9(4) comp-5.                                   480 0035 20
  617.    594         88  boolTRUE            value 1.                                       482 0035 20
  618.    595         88  boolFALSE           value 0.                                       482 0035 20
  619.    596                                                                                482 0035 20
  620.    597      03  flFrameFlags        pic 9(9) comp-5.                                  482 0036 21
  621.    598      03  winStyle            pic 9(9) comp-5.                                  486 0037 22
  622.    599      03  szClientClass       pic x(10) value 'FileUpdate'.                     48A 0038 23
  623.    600      03  filler              pic x    value x"00".                             494 0039 24
  624.    601      03  sFlag               pic 9(4)  comp-5.                                 495 0039 24
  625.    602      03  temp-num1           pic 9(4)  comp-5.                                 497 003A 25
  626.    603      03  temp-num2           pic 9(4)  comp-5.                                 499 003B 26
  627.    604    78  screen-message-start value NEXT.                                        49B 003B 26
  628.    605      03  screen-message       pic x(32).                                       49B 003C 27
  629.    606    78  size-of-message-line value NEXT - screen-message-start.                 4BB 003C 27
  630.    607                                                                                4BB 003C 27
  631.    608 01  workarea.                                                                  4C0 003D 28
  632.    609      03  temp-word       pic xx   comp-5.                                      4C0 003D 28
  633.    610      03  REDEFINES temp-word.                                                  4C0 003D 28
  634.    611          05 temp-ls      pic x   comp-5.                                       4C0 003D 28
  635.    612          05 temp-ms      pic x   comp-5.                                       4C1 003E 29
  636.    613                                                                                4C2 003E 29
  637.    614 01  field-coords.                                                              4C8 003F 2A
  638.    615     03  x           pic s9(4) comp-5.                                          4C8 003F 2A
  639.    616     03  y           pic s9(4) comp-5.                                          4CA 0040 2B
  640.    617                                                                                4CC 0040 2B
  641.    618 01  short-vars.                                                                4D0 0041 2C
  642.    619     03  cxChar      pic s9(4) comp-5.                                          4D0 0041 2C
  643.    620     03  cxCaps      pic s9(4) comp-5.                                          4D2 0042 2D
  644.    621     03  cyChar      pic s9(4) comp-5.                                          4D4 0043 2E
  645.    622     03  cyDesc      pic s9(4) comp-5.                                          4D6 0044 2F
  646.    623     03  cxClient    pic s9(4) comp-5.                                          4D8 0045 30
  647.    624     03  cyClient    pic s9(4) comp-5.                                          4DA 0046 31
  648.    625                                                                                4DC 0046 31
  649.    626 01  mp3                 pic xxxx comp-5.                                       4E0 0047 32
  650.    627 01  redefines mp3.                                                             4E0 0047 32
  651.    628     03  mp3w1           pic xx   comp-5.                                       4E0 0047 32
  652.    629     03  mp3w2           pic xx   comp-5.                                       4E2 0048 33
  653.    630                                                                                4E4 0048 33
  654.    631 01  hdr1-line.                                                                 4E8 0049 34
  655.    632   78 hdr1-line-start value NEXT.                                               4E8 0049 34
  656.    633     03                     pic x(65) value                                     4E8 0049 34
  657.    634                 "Simple Presentation Manager, COBOL Indexed File,              4E8 0049 34
  658.    635-                " update program".                                             4E8 0049 34
  659.    636   78 size-of-hdr1-line value NEXT - hdr1-line-start.                           529
  660.    637     03                     pic x value x"00".                                  529
  661. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  12
  662. *                                     PMNEWUP.CBL
  663.    638                                                                                529 004A 35
  664.    639 01 Character-bits.                                                             530 004A 35
  665.    640      03  ACTUAL-KC-INVALIDCHAR    pic 9.                                       530 004A 35
  666.    641      03  ACTUAL-KC-TOGGLE         pic 9.                                       531 004B 36
  667.    642      03  ACTUAL-KC-INVALIDCOMP    pic 9.                                       532 004C 37
  668.    643      03  ACTUAL-KC-COMPOSITE      pic 9.                                       533 004D 38
  669.    644      03  ACTUAL-KC-DEADKEY        pic 9.                                       534 004E 39
  670.    645      03  ACTUAL-KC-LONEKEY        pic 9.                                       535 004F 3A
  671.    646      03  ACTUAL-KC-PREVDOWN       pic 9.                                       536 0050 3B
  672.    647      03  ACTUAL-KC-KEYUP          pic 9.                                       537 0051 3C
  673.    648      03  ACTUAL-KC-ALT            pic 9.                                       538 0052 3D
  674.    649      03  ACTUAL-KC-CTRL           pic 9.                                       539 0053 3E
  675.    650      03  ACTUAL-KC-SHIFT          pic 9.                                       53A 0054 3F
  676.    651      03  ACTUAL-KC-SCANCODE       pic 9.                                       53B 0055 40
  677.    652      03  ACTUAL-KC-VIRTUALKEY     pic 9.                                       53C 0056 41
  678.    653      03  ACTUAL-KC-CHAR           pic 9.                                       53D 0056 41
  679.    654                                                                                53D 0056 41
  680.    655                                                                                53D 0056 41
  681.    656*---------------------------------------------------------*
  682.    657  local-storage section.                                                          0 0058 43
  683.    658                                                                                  0 0058 43
  684.    659  01  hps                 pic x(4) comp-5.                                        0 0059 44
  685.    660                                                                                  4 0059 44
  686.    661  01  swp.                                                                        8 005A 45
  687.    662      03                  PIC 9(4) COMP-5.                                        8 005A 45
  688.    663      03 win-size.                                                                A 005B 46
  689.    664         05  sxLeft          pic x(2) comp-5.                                     A 005B 46
  690.    665         05  syBottom        pic x(2) comp-5.                                     C 005C 47
  691.    666         05  sxRight         pic x(2) comp-5.                                     E 005D 48
  692.    667         05  syTop           pic x(2) comp-5.                                    10 005E 49
  693.    668      03                     PIC 9(9) COMP-5.                                    12 005F 4A
  694.    669      03                     PIC 9(9) COMP-5.                                    16 005F 4A
  695.    670                                                                                 1A 005F 4A
  696.    671  01 ptl.                                                                        20 005F 4A
  697.    672      03  x       pic s9(9) comp-5.                                              20 005F 4A
  698.    673      03  y       pic s9(9) comp-5.                                              24 0060 4B
  699.    674                                                                                 28 0060 4B
  700. *  675      copy "RECTL.CPY".                                                          28 0060 4B
  701.    676     03 RECTL.                                                                   28 0061 4C
  702.    677      05 RECTL-xLeft                      PIC S9(9) COMP-5.                      28 0061 4C
  703.    678      05 RECTL-yBottom                    PIC S9(9) COMP-5.                      2C 0062 4D
  704.    679      05 RECTL-xRight                     PIC S9(9) COMP-5.                      30 0063 4E
  705.    680      05 RECTL-yTop                       PIC S9(9) COMP-5.                      34 0064 4F
  706.    681                                                                                 38 0064 4F
  707.    682  01  mresult             pic x(4) comp-5.                                       38 0065 50
  708.    683                                                                                 3C 0065 50
  709.    684*---------------------------------------------------------*
  710.    685 linkage section.                                                               540 0065 50
  711.    686 01  hwnd                pic xxxx comp-5.                                         0 0066 51
  712.    687 01  msg                 pic xx   comp-5.                                         0 0067 52
  713.    688                                                                                  2 0067 52
  714.    689 01  mp1                 pic xxxx comp-5.                                         0 0068 53
  715.    690 01  redefines mp1.                                                               0 0068 53
  716.    691     03  mp1w1           pic xx   comp-5.                                         0 0068 53
  717.    692     03  mp1w2           pic xx   comp-5.                                         2 0069 54
  718.    693 01  redefines mp1.                                                               0 0068 53
  719.    694     03 fs               pic 9(4)  comp-5.                                        0 0068 53
  720.    695     03 cRepeat          pic 99   comp-5.                                         2 0069 54
  721. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  13
  722. *                                     PMNEWUP.CBL
  723.    696     03 scancode         pic 99   comp-5.                                         3 006A 55
  724.    697     03 scancode-x   redefines scancode pic x.                                    4 006A 55
  725.    698                                                                                  3 006A 55
  726.    699 01  mp2                 pic xxxx comp-5.                                         0 006B 56
  727.    700 01  redefines mp2.                                                               0 006B 56
  728.    701     03  mp2w1           pic xx   comp-5.                                         0 006B 56
  729.    702     03  mp2w2           pic xx   comp-5.                                         2 006C 57
  730.    703 01  redefines mp2.                                                               0 006B 56
  731.    704     03 chr              pic 9(4)  comp-5.                                        0 006B 56
  732.    705     03 chr-x        redefines chr                                                2 006B 56
  733.    706                         pic xx.                                                  0 006B 56
  734.    707     03 vKey             pic 9(4)  comp-5.                                        2 006C 57
  735.    708                                                                                  4 006C 57
  736.    709*---------------------------------------------------------*
  737.    710  procedure division OS2API.                                                      0
  738.    711  main section.                                                                  31 0005
  739.    712     perform start-up                                                            33
  740.    713     perform register-classes                                                    36
  741.    714     if boolTRUE                                                                 39
  742.    715         perform open-file                                                       40
  743.    716         perform create-client-window                                            43
  744.    717         perform set-data-entry-first-field                                      46
  745.    718         if hwndFrame not = 0                                                    49
  746.    719              perform message-loop until loop-end                                50
  747.    720         end-if                                                                  5C
  748.    721         close PmFile                                                            5D
  749.    722     end-if                                                                      78
  750.    723     perform shut-down                                                           79
  751.    724     stop run.                                                                   7C
  752.    725                                                                                 7D
  753.    726*---------------------------------------------------------*
  754.    727 start-up section.                                                               80 0006
  755.    728     perform set-procedure-entry-point                                           82
  756.    729     call OS2API 'WinInitialize'                                                 85
  757.    730                 using   by value 0 size 2                                       85
  758.    731                 returning hab                                                   85
  759.    732                                                                                 85
  760.    733     call OS2API 'WinCreateMsgQueue'                                             97
  761.    734                 using by value hab                                              97
  762.    735                       by value 0 size 2                                         97
  763.    736                 returning hmq.                                                  AE
  764.    737                                                                                 AE
  765.    738*---------------------------------------------------------*
  766.    739 set-procedure-entry-point section.                                              B1 000D
  767.    740     set ClientWndProc to ENTRY 'ClientWndProc'.                                 B3
  768.    741                                                                                 C5
  769.    742*---------------------------------------------------------*
  770.    743 register-classes section.                                                       C8 0007
  771.    744     call OS2API 'WinRegisterClass'                                              CA
  772.    745                 using by value     hab                                          CA
  773.    746                       by reference szClientClass                                CA
  774.    747                       by value     ClientWndProc                                CA
  775.    748                       by value     CS-SIZEREDRAW size 4                         CA
  776.    749                       by value     0        size 2                              CA
  777.    750                 returning bool.                                                 F0
  778.    751                                                                                 F0
  779.    752*---------------------------------------------------------*
  780.    753 message-loop section.                                                           F3 000B
  781. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  14
  782. *                                     PMNEWUP.CBL
  783.    754     call OS2API 'WinGetMsg'                                                     F5
  784.    755                   using   by value hab                                          F5
  785.    756                           by reference qmsg                                     F5
  786.    757                           by value 0            size 4                          F5
  787.    758                           by value 0            size 2                          F5
  788.    759                           by value 0            size 2                          F5
  789.    760                   returning bool                                                F5
  790.    761                                                                                 F5
  791.    762     if boolFALSE                                                               11C
  792.    763          add MB-YESNOCANCEL MB-ICONQUESTION giving MY-MB                       123
  793.    764          call OS2API 'WinMessageBox'                                           12F
  794.    765                using by value HWND-DESKTOP size 4                              12F
  795.    766                      by value hwndClient                                       12F
  796.    767                      by reference end-message                                  12F
  797.    768                      by reference szClientClass                                12F
  798.    769                      by value 0 size 2                                         12F
  799.    770                      by value MY-MB                                            12F
  800.    771                returning msg-box-answer                                        12F
  801.    772          if msg-box-answer = MBID-YES                                          15B
  802.    773              set loop-end to true                                              162
  803.    774          else                                                                  165
  804.    775              call OS2API 'WinCancelShutdown'                                   166
  805.    776                   using by value hmq                                           166
  806.    777                         by value 0 size 2                                      166
  807.    778          end-if                                                                179
  808.    779     else                                                                       17A
  809.    780          call OS2API 'WinDispatchMsg'                                          17B
  810.    781                   using by value hab                                           17B
  811.    782                         by reference qmsg                                      17B
  812.    783     end-if.                                                                    18E
  813.    784*---------------------------------------------------------*
  814.    785 shut-down section.                                                             192 000C
  815.    786     call OS2API 'WinDestroyWindow'   using by value hwndFrame                  194
  816.    787     call OS2API 'WinDestroyMsgQueue' using by value hmq                        1A3
  817.    788     call OS2API 'WinTerminate'       using by value hab.                       1B2
  818.    789*---------------------------------------------------------*
  819.    790 create-client-window section.                                                  1C4 0009
  820.    791     compute flFrameFlags = FCF-TITLEBAR   + FCF-SYSMENU                        1C6
  821.    792                          + FCF-SIZEBORDER + FCF-MINBUTTON                      1C6
  822.    793                          + FCF-MAXBUTTON  + FCF-SHELLPOSITION                  1C6
  823.    794                          + FCF-TASKLIST   + FCF-MENU                           1C6
  824.    795                          + FCF-ACCELTABLE + FCF-ICON                           1C6
  825.    796                                                                                1C6
  826.    797     call OS2API 'WinCreateStdWindow'                                           201
  827.    798                      using by value     HWND-DESKTOP size 4                    201
  828.    799                            by value     WS-VISIBLE size 4                      201
  829.    800                            by reference flFrameFlags                           201
  830.    801                            by reference szClientClass                          201
  831.    802                            by reference nulltext                               201
  832.    803                            by value     0        size 4                        201
  833.    804                            by value     0        size 2                        201
  834.    805                            by value     ID-RESOURCE  size 2                    201
  835.    806                            by reference hwndClient                             201
  836.    807                      returning hwndFrame                                       201
  837.    808                                                                                201
  838.    809     call OS2API 'WinQueryWindowPos'                                            240
  839.    810                    using   by value hwndFrame                                  240
  840.    811                            by reference swp                                    240
  841. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  15
  842. *                                     PMNEWUP.CBL
  843.    812                    returning bool                                              240
  844.    813                                                                                240
  845.    814     call OS2API 'WinSetWindowPos'                                              257
  846.    815                          using by value hwndFrame                              257
  847.    816                                by value HWND-TOP size 4                        257
  848.    817                                by value 0        size 2                        257
  849.    818                                by value 0        size 2                        257
  850.    819                                by value 0        size 2                        257
  851.    820                                by value 0        size 2                        257
  852.    821                                by value SWP-ACTIVATE size 2.                   257
  853.    822                                                                                257
  854.    823*---------------------------------------------------------------*
  855.    824 set-data-entry-first-field section.                                            289 000A
  856.    825     call OS2API 'WinSetFocus'                                                  28B
  857.    826                    using by value HWND-DESKTOP size 4                          28B
  858.    827                          by value hwndEntryField-1.                            2A1
  859.    828*---------------------------------------------------------------
  860.    829  MyWndProc-S section.                                                          2A4 000E
  861.    830  entry 'ClientWndProc' using by value hwnd                                     2A6
  862.    831                        by value msg                                            2A6
  863.    832                        by value mp1                                            2A6
  864.    833                        by value mp2.                                           2AD
  865.    834                                                                                2AD
  866.    835      move 0 to mresult                                                         2AD
  867.    836      evaluate msg                                                              2B3
  868.    837                                                                                2B3
  869.    838         when WM-CREATE                                                         2B3
  870.    839                                                                                2B3
  871.    840             perform WM-CREATE-routine                                          2BA
  872.    841                                                                                2BA
  873.    842         when WM-PAINT                                                          2BD
  874.    843                                                                                2BD
  875.    844             perform WM-PAINT-routine                                           2C6
  876.    845                                                                                2C6
  877.    846         when WM-SIZE                                                           2C9
  878.    847                                                                                2C9
  879.    848             perform WM-SIZE-routine                                            2D1
  880.    849                                                                                2D1
  881.    850         when WM-CONTROL                                                        2D4
  882.    851                                                                                2D4
  883.    852             perform WM-CONTROL-routine                                         2DD
  884.    853                                                                                2DD
  885.    854         when WM-COMMAND                                                        2E0
  886.    855                                                                                2E0
  887.    856             perform WM-COMMAND-routine                                         2E9
  888.    857                                                                                2E9
  889.    858         when WM-HELP                                                           2EC
  890.    859             perform WM-HELP-routine                                            2F5
  891.    860                                                                                2F5
  892.    861         when OTHER                                                             2F8
  893.    862             PERFORM Call-Default-WinProc                                       2F9
  894.    863                                                                                2F9
  895.    864      end-evaluate                                                              2FC
  896.    865      exit program returning mresult.                                           302
  897.    866                                                                                306
  898.    867*-----------------------------------------------------------------
  899.    868 WM-CREATE-routine section.                                                     309 000F
  900.    869     call OS2API 'WinQueryWindow'                                               30B
  901. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  16
  902. *                                     PMNEWUP.CBL
  903.    870                    using by value hwnd                                         30B
  904.    871                          by value QW-PARENT size 2                             30B
  905.    872                          by value 0 size 2                                     30B
  906.    873                    returning hwndParent                                        30B
  907.    874                                                                                30B
  908.    875     call OS2API 'WinWindowFromID'                                              328
  909.    876                    using by value hwndParent                                   328
  910.    877                          by value FID-MENU size 2                              328
  911.    878                    returning hwndMenu                                          328
  912.    879                                                                                328
  913.    880     move low-values to entry-field-contents                                    340
  914.    881*    move 0 to entry-field-2
  915.    882     move spaces to screen-message                                              346
  916.    883     move 0 to mResult.                                                         34B
  917.    884*-----------------------------------------------------------------
  918.    885 WM-PAINT-routine section.                                                      354 0010
  919.    886     call OS2API 'WinBeginPaint'                                                356
  920.    887                          using by value hwnd                                   356
  921.    888                                by value 0 size 4                               356
  922.    889                                by value 0 size 4                               356
  923.    890                          returning hps                                         356
  924.    891                                                                                356
  925.    892     call OS2API 'GpiErase'                                                     377
  926.    893                          using by value hps                                    377
  927.    894                                                                                377
  928.    895     move 0   to x of ptl                                                       386
  929.    896     compute y of ptl = cyClient - 15                                           38C
  930.    897                                                                                38C
  931.    898     call OS2API 'GpiCharStringAt'                                              399
  932.    899                          using by value hps                                    399
  933.    900                                by reference ptl                                399
  934.    901                                by value size-of-hdr1-line                      399
  935.    902                                by reference hdr1-line                          399
  936.    903                                                                                399
  937.    904     compute x of ptl = cxClient / 5                                            3B8
  938.    905     compute y of ptl = cyClient / 2 + 20                                       3C4
  939.    906                                                                                3C5
  940.    907     call OS2API 'GpiCharStringAt'                                              3D6
  941.    908                          using by value hps                                    3D6
  942.    909                                by reference ptl                                3D6
  943.    910                                by value 10 size 4                              3D6
  944.    911                                by reference "Record Key"                       3D6
  945.    912                                                                                3D6
  946.    913     compute x of ptl = (cxClient / 5) * 3                                      402
  947.    914     compute y of ptl = cyClient / 2 + 20                                       412
  948.    915                                                                                413
  949.    916     call OS2API 'GpiCharStringAt'                                              424
  950.    917                          using by value hps                                    424
  951.    918                                by reference ptl                                424
  952.    919                                by value 14 size 4                              424
  953.    920                                by reference "Data Field 1"                     424
  954.    921                                                                                424
  955.    922     compute x of ptl = cxClient / 5                                            452
  956.    923     compute y of ptl = cyClient / 4 + 20                                       45E
  957.    924                                                                                45F
  958.    925     call OS2API 'GpiCharStringAt'                                              470
  959.    926                          using by value hps                                    470
  960.    927                                by reference ptl                                470
  961. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  17
  962. *                                     PMNEWUP.CBL
  963.    928                                by value 14 size 4                              470
  964.    929                                by reference "Data Field 2"                     470
  965.    930                                                                                470
  966.    931     compute x of ptl = (cxClient / 5) * 3                                      49E
  967.    932     compute y of ptl = cyClient / 4 + 20                                       4AE
  968.    933                                                                                4AF
  969.    934     call OS2API 'GpiCharStringAt'                                              4C0
  970.    935                          using by value hps                                    4C0
  971.    936                                by reference ptl                                4C0
  972.    937                                by value 14 size 4                              4C0
  973.    938                                by reference "Data Field 3"                     4C0
  974.    939                                                                                4C0
  975.    940     move 1  to x of ptl                                                        4EE
  976.    941     move 20 to y of ptl                                                        4F4
  977.    942                                                                                4F4
  978.    943     call OS2API 'GpiCharStringAt'                                              4FB
  979.    944                          using by value hps                                    4FB
  980.    945                                by reference ptl                                4FB
  981.    946                                by value size-of-message-line                   4FB
  982.    947                                by reference screen-message                     4FB
  983.    948                                                                                4FB
  984.    949     call OS2API 'WinEndPaint' using by value hps                               519
  985.    950     move 0 to mResult.                                                         528
  986.    951*-----------------------------------------------------------------
  987.    952 WM-SIZE-routine section.                                                       531 0011
  988.    953     move mp2w1 to cxClient                                                     533
  989.    954     move mp2w2 to cyClient                                                     53A
  990.    955     if hwndEntryField-1 not = 0                                                541
  991.    956         PERFORM get-screen-contents                                            548
  992.    957         PERFORM Destroy-Entry-Fields                                           54B
  993.    958     end-if                                                                     54E
  994.    959     PERFORM Create-Entry-Fields                                                54F
  995.    960     move 0 to mResult.                                                         552
  996.    961*-----------------------------------------------------------------
  997.    962 WM-CONTROL-routine section.                                                    55B 0012
  998.    963     IF  mp2 = hwndClient OR hwndFrame                                          55D
  999.    964         PERFORM Call-Default-WinProc                                           56F
  1000.    965     ELSE                                                                       572
  1001.    966         EVALUATE mp1w2                                                         573
  1002.    967            WHEN EN-KILLFOCUS                                                   573
  1003.    968                perform kill-focus                                              57A
  1004.    969            WHEN EN-SETFOCUS                                                    57D
  1005.    970                set EntryFieldWinProc to ENTRY 'EWndProc'                       585
  1006.    971                EVALUATE mp1w1                                                  592
  1007.    972                   WHEN object-id-1                                             592
  1008.    973                      perform set-focus-1                                       59B
  1009.    974                   WHEN object-id-2                                             59E
  1010.    975                      perform set-focus-2                                       5A8
  1011.    976                   WHEN object-id-3                                             5AB
  1012.    977                      perform set-focus-3                                       5B5
  1013.    978                   WHEN object-id-4                                             5B8
  1014.    979                      perform set-focus-4                                       5C2
  1015.    980                END-EVALUATE                                                    5C5
  1016.    981                PERFORM Call-Default-WinProc                                    5C9
  1017.    982         END-EVALUATE                                                           5CC
  1018.    983     END-IF.                                                                    5CE
  1019.    984*-----------------------------------------------------------------
  1020.    985 WM-COMMAND-routine section.                                                    5D2 0013
  1021. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  18
  1022. *                                     PMNEWUP.CBL
  1023.    986     evaluate mp1w1                                                             5D4
  1024.    987         when IDM-READ                                                          5D4
  1025.    988             perform load-record                                                5DC
  1026.    989         when IDM-DELETE                                                        5DF
  1027.    990             perform delete-record                                              5E8
  1028.    991         when IDM-WRITE                                                         5EB
  1029.    992             perform save-new-record                                            5F4
  1030.    993         when IDM-REWRITE                                                       5F7
  1031.    994             perform overwrite-record                                           600
  1032.    995         when IDM-PREVIOUS                                                      603
  1033.    996             perform read-previous                                              60C
  1034.    997         when IDM-NEXT                                                          60F
  1035.    998             perform read-next                                                  618
  1036.    999         when IDM-CLEAR                                                         61B
  1037.   1000             perform clear-record                                               624
  1038.   1001         when IDM-EXIT                                                          627
  1039.   1002             call OS2API 'WinSendMsg'                                           630
  1040.   1003                using by value hwnd                                             630
  1041.   1004                      by value WM-CLOSE size 2                                  630
  1042.   1005                      by value 0        size 4                                  630
  1043.   1006                      by value 0        size 4                                  630
  1044.   1007                                                                                630
  1045.   1008     end-evaluate                                                               652
  1046.   1009     move 0 to mresult.                                                         65A
  1047.   1010*-----------------------------------------------------------------
  1048.   1011 WM-HELP-routine section.                                                       663 0014
  1049.   1012     add MB-OK MB-ICONEXCLAMATION giving MY-MB                                  665
  1050.   1013     call OS2API 'WinMessageBox'using                                           671
  1051.   1014           by value HWND-DESKTOP size 4                                         671
  1052.   1015           by value hwnd                                                        671
  1053.   1016           by reference No-help-yet-message                                     671
  1054.   1017           by reference szClientClass                                           671
  1055.   1018           by value 0 size 2                                                    671
  1056.   1019           by value MY-MB                                                       671
  1057.   1020     move 0 to mresult.                                                         699
  1058.   1021*---------------------------------------------------------------*
  1059.   1022 Confirm-delete-routine section.                                                6A2 0025
  1060.   1023     add MB-YESNO MB-ICONEXCLAMATION giving MY-MB                               6A4
  1061.   1024     call OS2API 'WinMessageBox' using                                          6B0
  1062.   1025           by value HWND-DESKTOP size 4                                         6B0
  1063.   1026           by value hwnd                                                        6B0
  1064.   1027           by reference delete-msg-confirm                                      6B0
  1065.   1028           by reference szClientClass                                           6B0
  1066.   1029           by value 0 size 2                                                    6B0
  1067.   1030           by value MY-MB                                                       6B0
  1068.   1031       returning msg-box-answer.                                                6F4
  1069.   1032*---------------------------------------------------------------*
  1070.   1033 process-virtual-keys section.                                                  6F7 0026
  1071.   1034     evaluate vKey                                                              6F9
  1072.   1035         when VK-TAB                                                            6F9
  1073.   1036            perform skip-next-field                                             700
  1074.   1037         when VK-BACKTAB                                                        703
  1075.   1038            perform skip-previous-field                                         70B
  1076.   1039         when other                                                             70E
  1077.   1040            PERFORM Call-Default-EntryFieldWinProc                              70F
  1078.   1041     end-evaluate.                                                              712
  1079.   1042*---------------------------------------------------------------*
  1080.   1043 skip-next-field section.                                                       717 0027
  1081. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  19
  1082. *                                     PMNEWUP.CBL
  1083.   1044     if object-flag not = 0                                                     719
  1084.   1045         evaluate object-flag                                                   720
  1085.   1046             when 1                                                             720
  1086.   1047                 move hwndEntryField-2 to hwndEntryField                        727
  1087.   1048             when 2                                                             72E
  1088.   1049                 move hwndEntryField-3 to hwndEntryField                        736
  1089.   1050             when 3                                                             73D
  1090.   1051                 move hwndEntryField-4 to hwndEntryField                        745
  1091.   1052             when 4                                                             74C
  1092.   1053                 move hwndEntryField-1 to hwndEntryField                        754
  1093.   1054         end-evaluate                                                           75B
  1094.   1055         call OS2API 'WinSetFocus'                                              75F
  1095.   1056                using by value HWND-DESKTOP size 4                              75F
  1096.   1057                      by value hwndEntryField                                   75F
  1097.   1058     end-if.                                                                    775
  1098.   1059*---------------------------------------------------------------*
  1099.   1060 skip-previous-field section.                                                   779 0028
  1100.   1061     if object-flag not = 0                                                     77B
  1101.   1062         evaluate object-flag                                                   782
  1102.   1063             when 1                                                             782
  1103.   1064                 move hwndEntryField-4 to hwndEntryField                        789
  1104.   1065             when 2                                                             790
  1105.   1066                 move hwndEntryField-1 to hwndEntryField                        798
  1106.   1067             when 3                                                             79F
  1107.   1068                 move hwndEntryField-2 to hwndEntryField                        7A7
  1108.   1069             when 4                                                             7AE
  1109.   1070                 move hwndEntryField-3 to hwndEntryField                        7B6
  1110.   1071         end-evaluate                                                           7BD
  1111.   1072         call OS2API 'WinSetFocus'                                              7C1
  1112.   1073                using by value HWND-DESKTOP size 4                              7C1
  1113.   1074                      by value hwndEntryField                                   7C1
  1114.   1075     end-if.                                                                    7D7
  1115.   1076*---------------------------------------------------------------*
  1116.   1077 EntryFieldWinProc-E SECTION.                                                   7DB 002A
  1117.   1078 ENTRY 'EWndProc' USING BY VALUE hwnd                                           7DD
  1118.   1079                        BY VALUE msg                                            7DD
  1119.   1080                        BY VALUE mp1                                            7DD
  1120.   1081                        BY VALUE mp2.                                           7E4
  1121.   1082                                                                                7E4
  1122.   1083     MOVE ZERO TO mresult                                                       7E4
  1123.   1084     EVALUATE msg                                                               7EA
  1124.   1085        WHEN WM-CHAR                                                            7EA
  1125.   1086           perform WM-CHAR-routine                                              7F3
  1126.   1087                                                                                7F3
  1127.   1088        WHEN OTHER                                                              7F6
  1128.   1089           PERFORM Call-Default-EntryFieldWinProc                               7F7
  1129.   1090                                                                                7F7
  1130.   1091     END-EVALUATE                                                               7FA
  1131.   1092     EXIT PROGRAM RETURNING mresult.                                            7FB
  1132.   1093                                                                                7FF
  1133.   1094*-----------------------------------------------------------------
  1134.   1095 WM-CHAR-routine section.                                                       802 002B
  1135.   1096     perform strip-sFlag-bits                                                   804
  1136.   1097     if ACTUAL-KC-VIRTUALKEY = 1                                                807
  1137.   1098         if ACTUAL-KC-KEYUP not = 1                                             80D
  1138.   1099             perform process-virtual-keys                                       813
  1139.   1100         else                                                                   816
  1140.   1101             PERFORM Call-Default-EntryFieldWinProc                             817
  1141. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  20
  1142. *                                     PMNEWUP.CBL
  1143.   1102         end-if                                                                 81A
  1144.   1103     else                                                                       81B
  1145.   1104         MOVE mp1w1 TO Temp-Word                                                81C
  1146.   1105         MULTIPLY 128 BY Temp-LS                                                823
  1147.   1106         IF  Temp-LS > ZERO                                                     82B
  1148.   1107*----------------------------------------*
  1149.   1108* Field  1 does not allow numerics       *
  1150.   1109* Field  2 is numeric                    *
  1151.   1110* Fields 3 & 4 can be any character      *
  1152.   1111*----------------------------------------*
  1153.   1112            EVALUATE hwnd                                                       832
  1154.   1113               WHEN hwndEntryField-1                                            832
  1155.   1114                  IF  mp2w1 > 47 AND < 58                                       83A
  1156.   1115                     move no-numerics-msg to screen-message                     84C
  1157.   1116                     perform display-screen-message                             86E
  1158.   1117                     PERFORM sound-beep                                         871
  1159.   1118                  ELSE                                                          874
  1160.   1119                     perform test-for-message-suppression                       875
  1161.   1120                     PERFORM Call-Default-EntryFieldWinProc                     878
  1162.   1121                  END-IF                                                        87B
  1163.   1122               WHEN hwndEntryField-2                                            87C
  1164.   1123                  IF  (mp2w1 > 47 AND < 58) OR mp2w1 < 32                       885
  1165.   1124                     perform test-for-message-suppression                       8A1
  1166.   1125                     PERFORM Call-Default-EntryFieldWinProc                     8A4
  1167.   1126                  ELSE                                                          8A7
  1168.   1127                     move numerics-only-msg to screen-message                   8A8
  1169.   1128                     perform display-screen-message                             8C3
  1170.   1129                     PERFORM sound-beep                                         8C6
  1171.   1130                  END-IF                                                        8C9
  1172.   1131               WHEN hwndEntryField-3                                            8CA
  1173.   1132               WHEN hwndEntryField-4                                            8CA
  1174.   1133                  perform test-for-message-suppression                          8DD
  1175.   1134                  PERFORM Call-Default-EntryFieldWinProc                        8E0
  1176.   1135               WHEN OTHER                                                       8E3
  1177.   1136                  PERFORM Call-Default-EntryFieldWinProc                        8E4
  1178.   1137            END-EVALUATE                                                        8E7
  1179.   1138         ELSE                                                                   8EA
  1180.   1139            PERFORM Call-Default-EntryFieldWinProc                              8EB
  1181.   1140         END-IF                                                                 8EE
  1182.   1141     END-IF.                                                                    8EF
  1183.   1142*-----------------------------------------------------------------
  1184.   1143 get-screen-contents section.                                                   8F0
  1185.   1144* For reasons which escape me, it seems that the size of the
  1186.   1145* field must be set to 1 greater than it really is. This is
  1187.   1146* not a bug, it is described as a feature!
  1188.   1147                                                                                8F3 0016
  1189.   1148      call OS2API 'WinQueryWindowText'                                          8F5
  1190.   1149                       using by value hwndEntryField-1                          8F5
  1191.   1150                             by value 6 size 2                                  8F5
  1192.   1151                             by reference entry-field-1                         8F5
  1193.   1152                                                                                8F5
  1194.   1153      call OS2API 'WinQueryWindowText'                                          90D
  1195.   1154                     using by value hwndEntryField-2                            90D
  1196.   1155                           by value 5 size 2                                    90D
  1197.   1156                           by reference entry-field-2-x                         90D
  1198.   1157                                                                                90D
  1199.   1158      call OS2API 'WinQueryWindowText'                                          925
  1200.   1159                     using by value hwndEntryField-3                            925
  1201. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  21
  1202. *                                     PMNEWUP.CBL
  1203.   1160                           by value 21 size 2                                   925
  1204.   1161                           by reference entry-field-3                           925
  1205.   1162                                                                                925
  1206.   1163      call OS2API 'WinQueryWindowText'                                          93D
  1207.   1164                     using by value hwndEntryField-4                            93D
  1208.   1165                           by value 21 size 2                                   93D
  1209.   1166                           by reference entry-field-4.                          955
  1210.   1167*-----------------------------------------------------------------
  1211.   1168 Create-Entry-Fields SECTION.                                                   958 0018
  1212.   1169     compute winstyle = WS-VISIBLE + ES-LEFT +                                  95A
  1213.   1170                        ES-MARGIN                                               95A
  1214.   1171     compute x of field-coords = cxClient / 5                                   972
  1215.   1172     compute y of field-coords = cyClient / 2                                   97F
  1216.   1173     call OS2API 'WinCreateWindow'                                              98C
  1217.   1174                 using by value hwndClient                                      98C
  1218.   1175                       by value WC-ENTRYFIELD size 4                            98C
  1219.   1176                       by reference entry-field-1                               98C
  1220.   1177                       by value winstyle                                        98C
  1221.   1178                       by value x of field-coords                               98C
  1222.   1179                       by value y of field-coords                               98C
  1223.   1180                       by value 60            size 2                            98C
  1224.   1181                       by value 14            size 2                            98C
  1225.   1182                       by value hwndClient                                      98C
  1226.   1183                       by value HWND-TOP      size 4                            98C
  1227.   1184                       by value object-id-1   size 2                            98C
  1228.   1185                       by value 0             size 4                            98C
  1229.   1186                       by value 0             size 4                            98C
  1230.   1187                 returning hwndEntryField-1                                     98C
  1231.   1188                                                                                98C
  1232.   1189     move size-of-field-1 to mp3w1                                              9E2
  1233.   1190     move 0 to mp3w2                                                            9E8
  1234.   1191     call OS2API 'WinSendMsg'                                                   9EE
  1235.   1192                    using   by value hwndEntryField-1                           9EE
  1236.   1193                            by value EM-SETTEXTLIMIT   size 2                   9EE
  1237.   1194                            by value mp3                                        9EE
  1238.   1195                            by value 0            size 4                        9EE
  1239.   1196                                                                                9EE
  1240.   1197     compute winstyle = WS-VISIBLE + ES-RIGHT +                                 A0E
  1241.   1198                        ES-MARGIN                                               A0E
  1242.   1199     compute x of field-coords = (cxClient / 5) * 3                             A26
  1243.   1200     compute y of field-coords = cyClient / 2                                   A37
  1244.   1201     call OS2API 'WinCreateWindow'                                              A44
  1245.   1202                 using by value hwndClient                                      A44
  1246.   1203                       by value WC-ENTRYFIELD size 4                            A44
  1247.   1204                       by reference entry-field-2-x                             A44
  1248.   1205                       by value winstyle                                        A44
  1249.   1206                       by value x of field-coords                               A44
  1250.   1207                       by value y of field-coords                               A44
  1251.   1208                       by value 50            size 2                            A44
  1252.   1209                       by value 14            size 2                            A44
  1253.   1210                       by value hwndClient                                      A44
  1254.   1211                       by value HWND-TOP      size 4                            A44
  1255.   1212                       by value object-id-2   size 2                            A44
  1256.   1213                       by value 0             size 4                            A44
  1257.   1214                       by value 0             size 4                            A44
  1258.   1215                 returning hwndEntryField-2                                     A44
  1259.   1216                                                                                A44
  1260.   1217     move size-of-field-2 to mp3w1                                              A9A
  1261. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  22
  1262. *                                     PMNEWUP.CBL
  1263.   1218     move 0 to mp3w2                                                            AA0
  1264.   1219     call OS2API 'WinSendMsg'                                                   AA6
  1265.   1220                    using   by value hwndEntryField-2                           AA6
  1266.   1221                            by value EM-SETTEXTLIMIT   size 2                   AA6
  1267.   1222                            by value mp3                                        AA6
  1268.   1223                            by value 0        size 4                            AA6
  1269.   1224                                                                                AA6
  1270.   1225                                                                                AA6
  1271.   1226     compute winstyle = WS-VISIBLE + ES-AUTOSCROLL +                            AC6
  1272.   1227                        ES-MARGIN                                               AC6
  1273.   1228     compute x of field-coords = cxClient / 5                                   ADE
  1274.   1229     compute y of field-coords = cyClient / 4                                   AEB
  1275.   1230     call OS2API 'WinCreateWindow'                                              AF8
  1276.   1231                 using by value hwndClient                                      AF8
  1277.   1232                       by value WC-ENTRYFIELD size 4                            AF8
  1278.   1233                       by reference entry-field-3                               AF8
  1279.   1234                       by value winstyle                                        AF8
  1280.   1235                       by value x of field-coords                               AF8
  1281.   1236                       by value y of field-coords                               AF8
  1282.   1237                       by value 90            size 2                            AF8
  1283.   1238                       by value 14            size 2                            AF8
  1284.   1239                       by value hwndClient                                      AF8
  1285.   1240                       by value HWND-TOP      size 4                            AF8
  1286.   1241                       by value object-id-3   size 2                            AF8
  1287.   1242                       by value 0             size 4                            AF8
  1288.   1243                       by value 0             size 4                            AF8
  1289.   1244                 returning hwndEntryField-3                                     AF8
  1290.   1245                                                                                AF8
  1291.   1246     move size-of-field-3 to mp3w1                                              B4E
  1292.   1247     move 0 to mp3w2                                                            B55
  1293.   1248     call OS2API 'WinSendMsg'                                                   B5B
  1294.   1249                    using   by value hwndEntryField-3                           B5B
  1295.   1250                            by value EM-SETTEXTLIMIT   size 2                   B5B
  1296.   1251                            by value mp3                                        B5B
  1297.   1252                            by value 0            size 4                        B5B
  1298.   1253                                                                                B5B
  1299.   1254     compute winstyle = WS-VISIBLE + ES-AUTOSCROLL +                            B7B
  1300.   1255                        ES-MARGIN                                               B7B
  1301.   1256     compute x of field-coords = (cxClient / 5) * 3                             B93
  1302.   1257     compute y of field-coords = cyClient / 4                                   BA4
  1303.   1258     call OS2API 'WinCreateWindow'                                              BB1
  1304.   1259                 using by value hwndClient                                      BB1
  1305.   1260                       by value WC-ENTRYFIELD size 4                            BB1
  1306.   1261                       by reference entry-field-4                               BB1
  1307.   1262                       by value winstyle                                        BB1
  1308.   1263                       by value x of field-coords                               BB1
  1309.   1264                       by value y of field-coords                               BB1
  1310.   1265                       by value 90            size 2                            BB1
  1311.   1266                       by value 14            size 2                            BB1
  1312.   1267                       by value hwndClient                                      BB1
  1313.   1268                       by value HWND-TOP      size 4                            BB1
  1314.   1269                       by value object-id-4   size 2                            BB1
  1315.   1270                       by value 0             size 4                            BB1
  1316.   1271                       by value 0             size 4                            BB1
  1317.   1272                 returning hwndEntryField-4                                     BB1
  1318.   1273                                                                                BB1
  1319.   1274     move size-of-field-4 to mp3w1                                              C07
  1320.   1275     move 0 to mp3w2                                                            C0E
  1321. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  23
  1322. *                                     PMNEWUP.CBL
  1323.   1276     call OS2API 'WinSendMsg'                                                   C14
  1324.   1277                    using   by value hwndEntryField-4                           C14
  1325.   1278                            by value EM-SETTEXTLIMIT   size 2                   C14
  1326.   1279                            by value mp3                                        C14
  1327.   1280                            by value 0            size 4.                       C14
  1328.   1281*-----------------------------------------------------------------
  1329.   1282 Destroy-Entry-Fields section.                                                  C37 0017
  1330.   1283    call OS2API 'WinDestroyWindow'                                              C39
  1331.   1284                   using by value hwndEntryField-1                              C39
  1332.   1285    call OS2API 'WinDestroyWindow'                                              C48
  1333.   1286                   using by value hwndEntryField-2                              C48
  1334.   1287    call OS2API 'WinDestroyWindow'                                              C57
  1335.   1288                   using by value hwndEntryField-3                              C57
  1336.   1289    call OS2API 'WinDestroyWindow'                                              C66
  1337.   1290                   using by value hwndEntryField-4.                             C75
  1338.   1291*-----------------------------------------------------------------
  1339.   1292 Call-Default-EntryFieldWinProc SECTION.                                        C78 0029
  1340.   1293      CALL OS2API DefEntryFieldWinProc                                          C7A
  1341.   1294                  using by value hwnd                                           C7A
  1342.   1295                        by value msg                                            C7A
  1343.   1296                        by value mp1                                            C7A
  1344.   1297                        by value mp2                                            C7A
  1345.   1298                  returning mresult.                                            C9C
  1346.   1299                                                                                C9C
  1347.   1300*-----------------------------------------------------------------
  1348.   1301 Call-Default-WinProc SECTION.                                                  C9F 0015
  1349.   1302      CALL OS2API 'WinDefWindowProc'                                            CA1
  1350.   1303                  using by value hwnd                                           CA1
  1351.   1304                        by value msg                                            CA1
  1352.   1305                        by value mp1                                            CA1
  1353.   1306                        by value mp2                                            CA1
  1354.   1307                  returning mresult.                                            CC3
  1355.   1308*-----------------------------------------------------------------
  1356.   1309 test-for-message-suppression section.                                          CC6 002F
  1357.   1310     if screen-message not = spaces                                             CC8
  1358.   1311         move spaces to screen-message                                          CCE
  1359.   1312         perform display-screen-message                                         CD3
  1360.   1313     end-if.                                                                    CD6
  1361.   1314*-----------------------------------------------------------------
  1362.   1315 sound-beep SECTION.                                                            CDA 002E
  1363.   1316     CALL OS2API 'DOSBEEP'                                                      CDC
  1364.   1317                  USING BY VALUE 512 SIZE 2                                     CDC
  1365.   1318                           VALUE 50  SIZE 2.                                    CDC
  1366.   1319*-----------------------------------------------------------------
  1367.   1320 open-file section.                                                             CF3 0008
  1368.   1321     open i-o PmFile                                                            CF5
  1369.   1322*-----------------------------------------------------------*
  1370.   1323* Create Header and Trailer records, if they are not already
  1371.   1324* present. These make read next and read previous simpler to
  1372.   1325* implement. Particularily for wrapping round the begining and
  1373.   1326* the end of the file.
  1374.   1327*-----------------------------------------------------------*
  1375.   1328     move low-values to file-record-key                                         D1C
  1376.   1329     read PmFile                                                                D22
  1377.   1330         invalid key                                                            D45
  1378.   1331             move 0 to file-numeric-value                                       D54
  1379.   1332             move all "*" to file-another-1                                     D5A
  1380.   1333             move all "*" to file-another-2                                     D60
  1381. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  24
  1382. *                                     PMNEWUP.CBL
  1383.   1334             write PmFileRecord                                                 D66
  1384.   1335     end-read                                                                   D81
  1385.   1336     move high-values to file-record-key                                        D83
  1386.   1337     read PmFile                                                                D89
  1387.   1338         invalid key                                                            DAC
  1388.   1339             move 0 to file-numeric-value                                       DBB
  1389.   1340             move all "*" to file-another-1                                     DC1
  1390.   1341             move all "*" to file-another-2                                     DC7
  1391.   1342             write PmFileRecord                                                 DCD
  1392.   1343     end-read.                                                                  DE8
  1393.   1344*-----------------------------------------------------------------
  1394.   1345 delete-record section.                                                         DED 001F
  1395.   1346     perform get-screen-contents                                                DEF
  1396.   1347     move entry-field-1 to file-record-key                                      DF2
  1397.   1348     if file-record-key = spaces or low-values                                  DF8
  1398.   1349         move invalid-key-msg to screen-message                                 E08
  1399.   1350         perform display-screen-message                                         E2A
  1400.   1351     else                                                                       E2D
  1401.   1352         perform confirm-delete-routine                                         E2E
  1402.   1353         if msg-box-answer = MBID-YES                                           E31
  1403.   1354             delete PmFile                                                      E38
  1404.   1355                 invalid key                                                    E4E
  1405.   1356                     move invalid-delete-msg to screen-message                  E5D
  1406.   1357                 not invalid key                                                E7F
  1407.   1358                     move valid-delete-msg to screen-message                    E80
  1408.   1359                     move low-values to entry-field-contents                    E9C
  1409.   1360*                    move 0 to entry-field-2
  1410.   1361                     perform refresh-windows                                    EA2
  1411.   1362             end-delete                                                         EA5
  1412.   1363         else                                                                   EA7
  1413.   1364             move not-deleted-msg to screen-message                             EA8
  1414.   1365         end-if                                                                 EC4
  1415.   1366         perform display-screen-message                                         EC5
  1416.   1367     end-if.                                                                    EC8
  1417.   1368*-----------------------------------------------------------------
  1418.   1369 read-next section.                                                             ECC 0023
  1419.   1370     perform get-screen-contents                                                ECE
  1420.   1371     initialize PmFileRecord                                                    ED1
  1421.   1372     move entry-field-1 to file-record-key.                                     EE9
  1422.   1373     read PmFile                                                                EEF
  1423.   1374     read PmFile next                                                           F17
  1424.   1375     if file-status not = "00" or file-record-key = high-values                 F3F
  1425.   1376         move low-values to file-record-key                                     F4F
  1426.   1377         read PmFile                                                            F55
  1427.   1378         read PmFile next                                                       F7D
  1428.   1379     end-if                                                                     FA5
  1429.   1380     perform fill-screen-from-file-record                                       FA6
  1430.   1381     move valid-load-msg to screen-message                                      FA9
  1431.   1382     perform refresh-windows                                                    FC5
  1432.   1383     perform display-screen-message.                                            FC8
  1433.   1384*-----------------------------------------------------------------
  1434.   1385 read-previous section.                                                         FCE 0022
  1435.   1386     perform get-screen-contents                                                FD0
  1436.   1387     initialize PmFileRecord                                                    FD3
  1437.   1388     move entry-field-1 to file-record-key                                      FEB
  1438.   1389     read PmFile                                                                FF1
  1439.   1390     read PmFile previous                                                      1019
  1440.   1391     if file-status not = "00" or file-record-key = low-values                 1041
  1441. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  25
  1442. *                                     PMNEWUP.CBL
  1443.   1392         move high-values to file-record-key                                   1051
  1444.   1393         read PmFile                                                           1057
  1445.   1394         read PmFile previous                                                  107F
  1446.   1395     end-if                                                                    10A7
  1447.   1396     perform fill-screen-from-file-record                                      10A8
  1448.   1397     move valid-load-msg to screen-message                                     10AB
  1449.   1398     perform refresh-windows                                                   10C7
  1450.   1399     perform display-screen-message.                                           10CA
  1451.   1400*-----------------------------------------------------------------
  1452.   1401 clear-record section.                                                         10D0 0024
  1453.   1402     move low-values to entry-field-contents                                   10D2
  1454.   1403*    move 0 to entry-field-2
  1455.   1404     move spaces to screen-message                                             10D8
  1456.   1405     perform refresh-windows                                                   10DD
  1457.   1406     perform display-screen-message.                                           10E0
  1458.   1407*-----------------------------------------------------------------
  1459.   1408 load-record section.                                                          10E6 001E
  1460.   1409     perform get-screen-contents                                               10E8
  1461.   1410     initialize PmFileRecord                                                   10EB
  1462.   1411     move entry-field-1 to file-record-key.                                    1103
  1463.   1412     if file-record-key = spaces or low-values or high-values                  1109
  1464.   1413         move invalid-key-msg to screen-message                                1122
  1465.   1414         perform display-screen-message                                        1144
  1466.   1415     else                                                                      1147
  1467.   1416         read PmFile                                                           1148
  1468.   1417             invalid key                                                       116B
  1469.   1418                 move low-values to entry-field-contents                       117A
  1470.   1419*                move 0 to entry-field-2
  1471.   1420                 move file-record-key to entry-field-1                         1180
  1472.   1421                 move invalid-load-msg to screen-message                       1186
  1473.   1422             not invalid key                                                   11A8
  1474.   1423                 perform fill-screen-from-file-record                          11A9
  1475.   1424                 move valid-load-msg to screen-message                         11AC
  1476.   1425         end-read                                                              11C8
  1477.   1426         perform refresh-windows                                               11CA
  1478.   1427         perform display-screen-message                                        11CD
  1479.   1428     end-if.                                                                   11D0
  1480.   1429*---------------------------------------------------------------*
  1481.   1430 save-new-record section.                                                      11D4 0020
  1482.   1431     perform get-screen-contents                                               11D6
  1483.   1432     perform fill-file-record-from-screen                                      11D9
  1484.   1433     if file-record-key = spaces or low-values or high-values                  11DC
  1485.   1434         move invalid-key-msg to screen-message                                11F5
  1486.   1435         perform display-screen-message                                        1217
  1487.   1436     else                                                                      121A
  1488.   1437         write PmFileRecord                                                    121B
  1489.   1438             invalid key                                                       1231
  1490.   1439                 move invalid-new-msg to screen-message                        1240
  1491.   1440             not invalid key                                                   1262
  1492.   1441                 move valid-new-msg to screen-message                          1263
  1493.   1442         end-write                                                             127F
  1494.   1443         perform display-screen-message                                        1281
  1495.   1444    end-if.                                                                    1284
  1496.   1445*---------------------------------------------------------------*
  1497.   1446 overwrite-record section.                                                     1288 0021
  1498.   1447     perform get-screen-contents                                               128A
  1499.   1448     perform fill-file-record-from-screen.                                     128D
  1500.   1449     if file-record-key = spaces or low-values or high-values                  1290
  1501. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  26
  1502. *                                     PMNEWUP.CBL
  1503.   1450         move invalid-key-msg to screen-message                                12A9
  1504.   1451         perform display-screen-message                                        12CB
  1505.   1452     else                                                                      12CE
  1506.   1453         rewrite PmFileRecord                                                  12CF
  1507.   1454             invalid key                                                       12E5
  1508.   1455                 move invalid-overwrite-msg to screen-message                  12F4
  1509.   1456             not invalid key                                                   1316
  1510.   1457                 move valid-overwrite-msg to screen-message                    1317
  1511.   1458         end-rewrite                                                           1333
  1512.   1459         perform display-screen-message                                        1335
  1513.   1460     end-if.                                                                   1338
  1514.   1461*---------------------------------------------------------------*
  1515.   1462 display-screen-message section.                                               133C 002D
  1516.   1463     if screen-message(1:5) = "ERROR"                                          133E
  1517.   1464        call OS2API 'WinReleasePS'                                             1348
  1518.   1465                using by value hps                                             1348
  1519.   1466                                                                               1348
  1520.   1467        call OS2API 'WinMessageBox'                                            1357
  1521.   1468                using by value HWND-DESKTOP size 4                             1357
  1522.   1469                      by value HWND-DESKTOP size 4                             1357
  1523.   1470                      by reference screen-message                              1357
  1524.   1471                      by reference szClientClass                               1357
  1525.   1472                      by value 0 size 2                                        1357
  1526.   1473                      by value MB-HELP size 2                                  1357
  1527.   1474        move spaces to screen-message                                          1380
  1528.   1475     end-if                                                                    1385
  1529.   1476     move 1   to RECTL-xleft                                                   1386
  1530.   1477     move 15  to RECTL-yBottom                                                 138C
  1531.   1478     move 300 to RECTL-xRight                                                  1393
  1532.   1479     move 35  to RECTL-yTop                                                    139B
  1533.   1480     call OS2API 'WinInvalidateRect'                                           13A2
  1534.   1481                     using by value hwndClient                                 13A2
  1535.   1482                           by reference rectl                                  13A2
  1536.   1483                           by value 0 size 2.                                  13A2
  1537.   1484*---------------------------------------------------------------*
  1538.   1485 fill-file-record-from-screen section.                                         13BD 0032
  1539.   1486     move entry-field-1 to file-record-key                                     13BF
  1540.   1487     move entry-field-2 to file-numeric-value                                  13C5
  1541.   1488     move entry-field-3 to file-another-1                                      13CB
  1542.   1489     move entry-field-4 to file-another-2.                                     13D1
  1543.   1490*---------------------------------------------------------------*
  1544.   1491 fill-screen-from-file-record section.                                         13DA 0031
  1545.   1492     move file-record-key    to entry-field-1                                  13DC
  1546.   1493     move file-numeric-value to entry-field-2                                  13E2
  1547.   1494     move file-another-1     to entry-field-3                                  13E8
  1548.   1495     move file-another-2     to entry-field-4.                                 13EE
  1549.   1496*---------------------------------------------------------------*
  1550.   1497 refresh-windows section.                                                      13F4
  1551.   1498                                                                               13F7 0030
  1552.   1499     call OS2API 'WinSetWindowText'                                            13F9
  1553.   1500                 using by value hwndEntryField-1                               13F9
  1554.   1501                       by reference entry-field-1                              13F9
  1555.   1502                                                                               13F9
  1556.   1503     call OS2API 'WinSetWindowText'                                            140C
  1557.   1504                 using by value hwndEntryField-2                               140C
  1558.   1505                       by reference entry-field-2-x                            140C
  1559.   1506                                                                               140C
  1560.   1507     call OS2API 'WinSetWindowText'                                            141F
  1561. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  27
  1562. *                                     PMNEWUP.CBL
  1563.   1508                 using by value hwndEntryField-3                               141F
  1564.   1509                       by reference entry-field-3                              141F
  1565.   1510                                                                               141F
  1566.   1511     call OS2API 'WinSetWindowText'                                            1432
  1567.   1512                 using by value hwndEntryField-4                               1432
  1568.   1513                       by reference entry-field-4.                             1445
  1569.   1514*---------------------------------------------------------------*
  1570.   1515 strip-sFlag-bits section.                                                     1448 002C
  1571.   1516     move fs to sFlag                                                          144A
  1572.   1517     divide sFlag     by 2 giving temp-num1                                    1451
  1573.   1518                        remainder ACTUAL-KC-CHAR                               1451
  1574.   1519     divide temp-num1 by 2 giving temp-num2                                    1469
  1575.   1520                        remainder ACTUAL-KC-VIRTUALKEY                         146A
  1576.   1521     divide temp-num2 by 2 giving temp-num1                                    1482
  1577.   1522                        remainder ACTUAL-KC-SCANCODE                           1483
  1578.   1523     divide temp-num1 by 2 giving temp-num2                                    149B
  1579.   1524                        remainder ACTUAL-KC-SHIFT                              149C
  1580.   1525     divide temp-num2 by 2 giving temp-num1                                    14B4
  1581.   1526                        remainder ACTUAL-KC-CTRL                               14B5
  1582.   1527     divide temp-num1 by 2 giving temp-num2                                    14CD
  1583.   1528                        remainder ACTUAL-KC-ALT                                14CE
  1584.   1529     divide temp-num2 by 2 giving temp-num1                                    14E6
  1585.   1530                        remainder ACTUAL-KC-KEYUP                              14E7
  1586.   1531     divide temp-num1 by 2 giving temp-num2                                    14FF
  1587.   1532                        remainder ACTUAL-KC-PREVDOWN                           1500
  1588.   1533     divide temp-num2 by 2 giving temp-num1                                    1518
  1589.   1534                        remainder ACTUAL-KC-LONEKEY                            1519
  1590.   1535     divide temp-num1 by 2 giving temp-num2                                    1531
  1591.   1536                        remainder ACTUAL-KC-DEADKEY                            1532
  1592.   1537     divide temp-num2 by 2 giving temp-num1                                    154A
  1593.   1538                        remainder ACTUAL-KC-COMPOSITE                          154B
  1594.   1539     divide temp-num1 by 2 giving temp-num2                                    1563
  1595.   1540                        remainder ACTUAL-KC-INVALIDCOMP                        1564
  1596.   1541     divide temp-num2 by 2 giving temp-num1                                    157C
  1597.   1542                        remainder ACTUAL-KC-TOGGLE                             157D
  1598.   1543     divide temp-num1 by 2 giving temp-num2                                    1595
  1599.   1544                        remainder ACTUAL-KC-INVALIDCHAR.                       15AE
  1600.   1545*---------------------------------------------------------------*
  1601.   1546 kill-focus section.                                                           15B1 0019
  1602.   1547     call OS2API 'WinSubClassWindow'                                           15B3
  1603.   1548                     using by value mp2                                        15B3
  1604.   1549                           by value DefEntryFieldWinProc                       15B3
  1605.   1550                     returning DefEntryFieldWinProc.                           15CA
  1606.   1551*---------------------------------------------------------------*
  1607.   1552 set-focus-1 section.                                                          15CD 001A
  1608.   1553     move 1 to object-flag                                                     15CF
  1609.   1554     call OS2API 'WinSubClassWindow'                                           15D5
  1610.   1555                       using by value hwndEntryField-1                         15D5
  1611.   1556                             by value EntryFieldWinproc                        15D5
  1612.   1557                       returning DefEntryFieldWinProc.                         15EC
  1613.   1558*---------------------------------------------------------------*
  1614.   1559 set-focus-2 section.                                                          15EF 001B
  1615.   1560     move 2 to object-flag                                                     15F1
  1616.   1561     call OS2API 'WinSubClassWindow'                                           15F7
  1617.   1562                       using by value hwndEntryField-2                         15F7
  1618.   1563                             by value EntryFieldWinproc                        15F7
  1619.   1564                       returning DefEntryFieldWinProc.                         160E
  1620.   1565*---------------------------------------------------------------*
  1621. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002 13-May-90 19:46 Page  28
  1622. *                                     PMNEWUP.CBL
  1623.   1566 set-focus-3 section.                                                          1611 001C
  1624.   1567     move 3 to object-flag                                                     1613
  1625.   1568     call OS2API 'WinSubClassWindow'                                           1619
  1626.   1569                       using by value hwndEntryField-3                         1619
  1627.   1570                             by value EntryFieldWinproc                        1619
  1628.   1571                       returning DefEntryFieldWinProc.                         1630
  1629.   1572*---------------------------------------------------------------*
  1630.   1573 set-focus-4 section.                                                          1633 001D
  1631.   1574     move 4 to object-flag                                                     1635
  1632.   1575     call OS2API 'WinSubClassWindow'                                           163B
  1633.   1576                       using by value hwndEntryField-4                         163B
  1634.   1577                             by value EntryFieldWinproc                        163B
  1635.   1578                       returning DefEntryFieldWinProc.                         1652
  1636. * Micro Focus COBOL/2 Version 2.4.18 L2.3 revision 002
  1637. * Copyright (C) 1985,1990 Micro Focus Ltd.     URN AXUPA/MF0/30034
  1638. *                                              REF GNB-000049002A6
  1639. *
  1640. * Total Messages:     0
  1641. * Data:        1456     Code:        5758     Dictionary:       23549
  1642.