External Files

Qedit 5.7 for HP-UX

Home Previous Next


External Files

As well as its own workfiles, Qedit recognizes "external" files of other formats (in List file, Add 5=file, Text file, etc.). When Qedit opens an external file, it determines the language of the source program in that file according to the following chart. Files with a ".cbl," ".cob", ".CBL" or ".pco" extension are treated as COBOL source files. In this case, Qedit does not assume there is a sequence number in the first 6 columns; it checks the first 5 lines of the file. The .pco extension is typically used to identify Cobol source files that needs to be processed by the Oracle pre-compiler.

If the lines contain only numeric digits in these columns, Qedit assumes the file contains sequence numbers and uses them appropriately. These numbers are written back to the file when a Keep command is executed.

If the lines only contain spaces in these columns, Qedit assumes the file is unnumbered and automatically assigns numbers during the Text operation. If some of the lines have a sequence number already, this number is replaced with Qedit's calculated number. When the file is saved, the sequence numbers are replaced by spaces.

If the first 6 columns do not contain either numeric digits or spaces, Qedit assumes the file is free-format and assigns it line numbers in the same way that numbers are assigned to Text files. The file format might change on a Keep command, depending on the Set Keep Cobfree option.

When accessing files, Qedit checks the extension of the file, if any. It then tries to determine the language based on the extension. Currently, the following languages are recognized:

Language Extensions
Cobol CBL, COB
CC H, C
CPP CPP
HTML HTM, HTML, ASP
XML XML
JAVA JAVA
QSL QSL
PASCAL P, PAS, PASCAL, MODULE, INCLUDE, FORWARD, EXTERNAL

Extensions are not case-sensitive i.e. cbl is the same as CBL.

Record Size (bytes) Leading Columns (1-6) Contain Last 8 Columns of First Line Current Language Setting* File Code / Ext. Num / Unn? LANG Used
74       ext. Unn COBOLX
66       ext. Unn COBOL
80 6 digits     ext. Num COBOLX
80 6 digits     not ext. Unn JOB
80 no digits no digits RPG   Unn RPG
80 no digits 8 digits FORTRAN   Num FTN
80 no digits 8 digits Pascal ext/ Num Pascal
80 no digits 8 digits not Ftn/Pas   Num SPL*
72 6 digits       Num COBOL
72 no digits   FORTRAN   Unn FTN
72 no digits   Pascal ext. Unn Pascal
72 no digits   not Ftn/Pas   Unn SPL*
80 no digits no digits     Unn JOB
88 8 digits       Num JOB
9-264 8 digits       Num TEXT
1-256 no digits       Unn TEXT
1-1000 no digits or spaces     ext. Unn COBFREE
1-1000 no digits     ext. Unn HTML
1-1000 no digits     ext. Unn XML
1-1000 no digits     ext. Unn JAVA
1-1000 no digits     ext. Unn QSL

* see Set FORTRAN ON.

In this table, the "File code / Ext." column indicates how Qedit determines which language to use. Code means it uses the file code only. Ext. means it uses the file extension only. Both means it checks the file code and the file extension.

Qedit maps an ASCII external file into one of these file formats. Qedit checks the last eight columns of each of the first five lines for an ascending sequence number. If five lines with valid sequence numbers are found, the file is treated as a Numbered file. Qedit may sometimes mistake a data file for a source file with sequence numbers. If there is an ambiguity in identifying the language of an external file, you can direct Qedit to the proper choice by appending a file type to the file name in the Text, List, and Add commands. For example, /List abc,unn;Text def,pascal.

External files with 80-character records and no valid SPL sequence numbers are treated as RPG files, if the current language setting is RPG; otherwise, they are treated as JOB files.


Home Previous Next