Last Revised: 02/16/14 |
This program can be used to copy/append and/or delete window based text created with the W type option of CDS069. It is strongly suggested that you use this routine to copy or delete window based text, since there are data structure changes planned to support new features of window based text. Hardcoded logic to copy or delete may fail when these new features are implemented.
Window Text is also frequently called Notepad text.
Due to the structure of window text files, you cannot simply move the file using the File Utility when it becomes necessary to increase the text ID size or the characters per record. Instead, define the new file with the keysize and characters per record required, then use CDS054 to transfer the data to the new file.
Window text files use multiple records to store text. Each record has a single character suffix, in addition to the text ID. This limits the text for each text ID to be 256 records. Window text files can be defined with any characters per record, but the characters per record will limit the total size of the text. For most text files, setting the characters per record to 128 will provide for over 250 lines of text with some use of attributes (bold, underline, etc.). In some cases, the text might require more than 250 lines, in which case you would set the characters per record to 256, 512, 1024 or even larger.
Calling Format:
CALL "CDS054", Y$, CHAN, TEXTID$, { NEWID$, NEWCHAN, HEADING$
}
Note that when using the NEWCHAN
option to copy text to another file, the new
file key size and/or characters per record may be different from the "copy from" file.
Examples |
Delete notepad text from file name XXCM06 with key of CUSTNO$+"A" : |
CALL "CDS095",CM06,"XXCM06","YNX"
|
Copy notepad text from file name XXCM06 with a key of OLDCUSTNO$ to
NEWCUSTNO$ : |
CALL "CDS095",CM06,"XXCM06","YNX"
|
Copy notepad text with ID "1234" from file name XXCM06 to file XXVM06 with a new ID of "123456": |
CALL "CDS095",CM06,"XXCM06","YNX"
|
Append notepad text from file name XXCM06 with a key of OLDCUSTNO$
to the same file with a key of NEWCUSTNO$ without any separator between
original and appended text, then remove notepad text of OLDCUSTNO$ . |
CALL "CDS054",Y$,CM06,OLDCUSTNO$
|
Append notepad text from a temporary file FILNAM$ with a key of
CBP$
to file RLSC06 with the same text ID with a separator between original
and appended text showing the date and user who authored the appended
text: |
CALL "CDS095",TMP,FILNAM$,"YNX"
|