Handling long strings

For character columns (CHAR, VARCHAR), you can specify from and to strings (from_string and to_string) up to 100 characters long. However, when you are dealing with long strings, you may find that you cannot fit the whole CHANGE command (including other parameters) on the command line. To overcome the problem, do one of the following to display an Extended Command Entry pop-up panel (see Extended Command Entry pop-up panel for the CHANGE command):
  • Enter CX (for Change Extended)
  • Enter the CHANGE primary command (or one of its abbreviations, such as C) with no parameters
    Note: If you have previously used the CHANGE or FIND commands in the current FM/Db2 editor session, to display the Extended Command Entry pop-up panel in this way, you will need to first use the RESET command before entering the CHANGE command (or one of its abbreviations) without any parameters. Alternatively, enter CX.
The Extended Command Entry pop-up panel contains five lines (each 50 characters long) that you use to enter all the CHANGE command parameters (but not the actual keyword CHANGE or any of its abbreviations). FM/Db2 treats the five lines on the pop-up panel as contiguous, allowing you to specify long from and to strings, the Db2® column number and optionally any other parameters, using up to 250 characters in total.
Note: You can continue a string (or any other parameter) from the last position on one line of the pop-up panel to the first position of the next line. However, this does not mean that you need to completely fill a line before using the next line. For example, you can specify the from string on the first of the five lines, the to string on the next line, and the Db2® column number (specified as #n) on the next line. If you do not use all of a line, FM/Db2 treats the unused part of the line as a single space.
Extended Command Entry pop-up panel for the CHANGE command shows the Extended Command Entry pop-up panel for the CHANGE command. In this example, any previous occurrences of the string dichlorodiphenyltrichloroethane in Db2® columns 4 or 7, between the labels .abc and .def, are to be changed to the string trinitrophenylmethylnitramine for non-excluded rows only.
Figure 1. Extended Command Entry pop-up panel for the CHANGE command
Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFG2)                     Table Edit                           1 of 42
 TABLE FMNUSER.EMP                                                  Format TABL
   ┌───────────────────── Extended Command Entry ──────────────────────┐ DATE
   │                                                                   │
   │ Complete typing the CHANGE command and press Enter.               │
   │                                                                   │
 0 │ CHANGE  ===> dichlorodiphenyltrichloroethane                      │
 0 │         ===> trinitrophenylmethylnitramine                        │m silica
 0 │         ===> prev (#4 #7)                                         │ure dilu
 0 │         ===> .abc .def                                            │roxide
 0 │         ===> nx                                                   │te aceti
 0 │                                                                   │dium car
 0 │                                                                   │tassium
 0 │  F1=Help    F2=Split   F3=Exit    F9=Swap   F12=Cancel            │te aceti
 0 └───────────────────────────────────────────────────────────────────┘ 9/1980
 000009 000110 magnesium silicate
 000010 000120 sodium bicarbonate
 000011 000130 aqueous solution of ammonium hydroxide
 000012 000140 ammonium hydroxide solution
 Command ===> c                                                     Scroll PAGE
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel
Extended Command Entry pop-up panel for the CHANGE command showing contiguous nature of entry lines shows the pop-up panel for the CHANGE command where the next occurrence of a long string (84 characters) in Db2® column 5 is to be changed to another long string (70 characters).
Figure 2. Extended Command Entry pop-up panel for the CHANGE command showing contiguous nature of entry lines
Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFG2)                     Table Edit                           1 of 42
 TABLE FMNUSER.EMP                                                  Format TABL
   ┌───────────────────── Extended Command Entry ──────────────────────┐ DATE
   │                                                                   │
   │ Complete typing the CHANGE command and press Enter.               │
   │                                                                   │
 0 │ CHANGE  ===> 'It is wise to apply the oil of refined politeness   │
 0 │         ===>  to the mechanisms of friendship.'                   │ch who y
 0 │         ===> 'In prosperity our friends know us; in adversity w   │lain you
 0 │         ===> e know our friends.' #5                              │or them
 0 │         ===>                                                      │ng you n
 0 │                                                                   │horizes
 0 │                                                                   │rare, le
 0 │  F1=Help    F2=Split   F3=Exit    F9=Swap   F12=Cancel            │y new fr
 0 └───────────────────────────────────────────────────────────────────┘ 9/1980
 000009 000110 You can make more friends in two months by becoming interested in
 000010 000120 Never explain--your friends do not need it and your enemies will
 000011 000130 Do not protect yourself by a fence, but rather by your friends.
 000012 000140 Nothing changes your opinion of a friend so surely as success - y
 Command ===> c                                                     Scroll PAGE
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel