HP 3000 Manuals

CHANGE [ ALLBASE/ISQL Reference Manual ] MPE/iX 5.0 Documentation


ALLBASE/ISQL Reference Manual

CHANGE 

The CHANGE command modifies the first occurrence or all occurrences of a
string in the command buffer.

Scope 

ISQL only.

ISQL Syntax 

C[HANGE] Delimiter OldString Delimiter NewString Delimiter [@]

Parameters 

Delimiter               is a one-byte nonblank character delimiting
                        OldString and NewString.

OldString               is the string in the command buffer to be
                        replaced.  Its maximum length is 32K bytes.

NewString               is the string to replace the OldString.  Its
                        length does not have to equal that of OldString.
                        Its length can range from 0 to 32K bytes.

@                       is specified to change all occurrences of
                        OldString.  If omitted, only the first occurrence
                        of OldString is changed.

Description 

   *   If Delimiter, OldString, or NewString contains one of the
       following special characters, precede the special character with
       the escape character defined with the ESCAPE option of the SET
       command:

             '
             "
             &
             ;
             SET ESCAPE Character (initial setting = \)

   *   In prompting mode, do not enter delimiters.  For example:

             isql=> CHANGE; 

             Old string> OldString; 
             New string> NewString; 
             Change all occurrences (Y/N)> Y 

            Changed command is displayed. 

Example 

     isql=> RECALL CURRENT; 

     SELECT Name,Owner FROM System.Table WHERE Type = '0';

     isql=> CHANGE |\'||@; 

     When nothing is inserted for the new string, the old string is deleted. 
     SELECT Name,Owner FROM System.Table WHERE Type = 0;

     isql=> CHANGE |Owner|Nrows,Avglen|; 

     SELECT Name,Nrows,Avglen FROM System.Table WHERE Type = 0;

     isql=> CHANGE |,Avglen||; 

     SELECT Name,Nrows FROM System.Table WHERE Type = 0;

isql=> START; [REV BEG]



MPE/iX 5.0 Documentation