HPlogo FCOPY Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 5 FCOPY Functions

CCTL/NOCCTL

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

CCTL designates the first character of each record in the fromfile as a carriage control character in the tofile. NOCCTL specifies that the first character of each record in the fromfile is not to be used as a carriage control character in the tofile.

Syntax

   ;{CCTL

     NOCCTL}

Operation

The effect of CCTL or NOCCTL depends upon whether or not the file equations or disk labels of the files you are copying specify carriage control. If you do not use either function, FCOPY treats carriage control characters as shown in table 5-2.

Table 5-2 Copying Files without Using CCTL or NOCCTL

CCTL specified in the file equation or disk label for

Default

Effect

fromfiletofile 
NONOThe entire record of the fromfile is copied to the tofile.
NOYESThe entire record of the fromfile is copied to the tofile; a single spacing character is supplied.
YESNOThe entire record of the fromfile, including the carriage control character, is copied into the tofile as data.
YESYES The entire record of the fromfile is copied into the tofile. The carriage control character for the fromfile becomes the carriage control character for the tofile.

 

Table 5-3 shows the effect of using the CCTL function with files that have CCTL or NOCCTL specified. When an equation or disk file label for the tofile specifies NOCCTL (no carriage control) and an FCOPY command specifies CCTL, the NOCCTL specification in the file equation or disk label overrides the FCOPY command.

NOTE: Asterisks (***) show where a file equation or disk label overrides the FCOPY command in tables 5-3 and 5-4.

Table 5-3 Copying Files Using CCTL

CCTL specified in the file equation or disk label forEffect
fromfiletofile 
NONO***The entire record of the fromfile is copied to the tofile. No carriage control characters are supplied.
NOYESThe entire record of the fromfile is copied to the tofile; the first character of the fromfile record is interpreted as a carriage control character, not as data.
YESNO***The entire record of the fromfile, including the carriage control character, is copied as data.
YESYESThe entire record of the fromfile is copied into the tofile. The carriage control character for the fromfile becomes the carriage control character for the tofile.

 

Table 5-4 shows the effect of using NOCCTL.

Table 5-4 Copying Files Using NOCCTL

CCTL specified in the file equation or disk label forEffect
fromfiletofile 
NONOThe entire record of the fromfile is copied to the tofile. No carriage control character is supplied.
NOYES***The entire record of the fromfile is copied to the tofile. A single spacing carriage control character is supplied for each record of the tofile.
YESNOThe entire record of the fromfile, including the carriage control character, is copied as data.
YESYES***The entire record of the fromfile, including the carriage control character of the fromfile, is copied into the tofile. A single spacing carriage control character is supplied for each tofile record.

 

Examples

ALPHA is a disk file, and its label specifies the CCTL option. BETA is a disk file created without CCTL.

The command below copies each record from BETA to ALPHA, interpreting the first data character in each record in BETA as the carriage control character:

   >FROM=BETA;TO=ALPHA;CCTL

In the next example, the command copies each record from ALPHA to GAMMA, a new file, using the carriage control character in each record in ALPHA as the carriage control character in each record in GAMMA. File GAMMA is created with the CCTL attribute, as follows:

   >FROM=ALPHA;TO=GAMMA;NEW;CCTL

As we have seen above, ALPHA is a disk file that has CCTL specified in its label, and BETA is a disk file without CCTL. In the following example, the FCOPY command copies each record from ALPHA to BETA, including the carriage control character, as data.

   >FROM=ALPHA;TO=BETA;NOCCTL
Feedback to webmaster