Qedit Commands - Set Command [S] - Language

Qedit 5.7 for HP-UX

Home Previous Next


Language

Set Language lang

(Initially: SPL)

The lang codes accepted by Qedit are:

COBOL, COBOLX [ALL], SPL, FORTRAN, Pascal, RPG, Job, Text, Data, CC, CPP, PowerHouse (PH), COBFREE, Html, XML, Java and QSL (Qedit Scripting Language).

Initially when Qedit starts the language is assumed to be SPL, but this may be changed when you Text a file ("SPL" stands for Systems Programming Language, which is an obscure software tool on the original HP e3000 system; files have 80-character records with columns 73-80 containing a sequence number). You can override this default this with Set Lang. When you Set Lang, you also reset the Window, the Length, the Left margin, and the Right margin.

The "language" sets the following file attributes:

  1. Increment between lines
  2. Number of digits in line number
  3. Placement of line number (left or right)
  4. Maximum data line length
  5. Number of first data column
  6. Name of compiler program file
  7. Delimiters for Set Window (SMART)
  8. Numbered or not for Keeps

The following chart shows the values set for each language:

Lang 1 2 3 4 5 6 7 8
COBOL 0.100 6 Left 66 7 COBOL Special, not "-" Yes
COBOLX 0.100 6 Left 74 7 COBOL Special, not "-" Yes
SPL 1.000 8 Right 72 1 SPL Special, not "'" Yes
Fortran 1.000 8 Right 72 1 Fortran Any special Yes
Pascal 1.000 8 Right 72 1 Pascal Special, not "_" Yes
RPG 1.000 8 Right 80 1 RPG Ignored No
Job 1.000 8 Right 80 1 Null Any special No
Text 1.000 8 Right 256 1 Null Any special No
Data 1.000 8 Right 1,000 1 Null Any special No
CC 1.000 8 Right 1,000 1 Null Special, not "_" No
CPP 1.000 8 Right 1,000 1 Null Special, not "_" No
PH 1.000 8 Right 1,000 1 Null Special, not "-" No
COBFREE 1.000 8 Right 1,000 1 Null Special, not "-" No
HTML 1.000 8 Right 1,000 1 Null Special No
XML 1.000 8 Right 1,000 1 Null Special No
JAVA 1.000 8 Right 1,000 1 Null Special, not "_" No
QSL 1.000 8 Right 1,000 1 Null Special, not "_" No

COBOL and COBOLX are identical, except that COBOLX allows data to extend into columns 73-80, while COBOL does not. This is a protection against compile errors for those programmers who do not use columns 73-80 for comments. You can force all COBOL files to be in COBOLX format by using

/set lang cobolx all on

This is useful when you are using Set X to tag program changes with a string or the date. You can change from a non-COBOL to a COBOL language, if the highest line number in your file is less than or equal to 999.999.

The COBOL and COBOLX languages follow the COBOL standards very carefully. These standards describe the format of a statement. Most, if not all, compilers support the standards. Some compilers, however, allow a source file to be in a different format. Here is a quick summary of the differences between COBOL, COBOLX and COBFREE:

  COBOL COBOLX COBFREE
Line numbers columns 1-6 columns 1-6 none
Control column column 7 column 7 column 1
Statements columns 8-72 columns 8-72 columns 1-1,000
Comments none columns 73-80 None
Starting column 7 7 1
Variable length no no Yes
Record length 72 80 1,000

The Data Language setting defaults to 256 characters per record, but it can handle up to 8,172 characters in a Wide-Jumbo workfile. In a workfile of Jumbo format, the limit is actually 1,000. To use Data, your workfile must be in Jumbo or Wide-Jumbo format, which supports longer lines and more of them (99,999,999 instead of 65,535). If a non-Jumbo workfile is open, you will have to shut it before you can use Set Lang Data and create a new workfile. To check whether your open workfile is Jumbo or not, use Verify Open. If you see "No Recall" in the display, you are using an old workfile. If you see "Jumbo" or "W-Jumbo" after the Language value, you are using a Jumbo file.

Because RPG is a column-oriented language, SMART searches on RPG source files are performed in DUMB mode.

In FORTRAN, spaces in the middle of names have no significance (i.e., CUST BOOK is the same as CUSTBOOK).

If a workfile is empty, you can set the Language to anything you like.

When you change Language, you change the maximum line Length. If Length is reduced, as in going from Job to SPL, the lines are not actually truncated to the shorter Length. They are only permanently truncated if you modify the lines. Therefore, you can switch back to the previous Language at once and still recover the full lines. (Note: when you switch from COBOLX to COBOL, lines with comments are actually stripped of their comments.) Of course, when you Keep your file, only the data within the new margins are kept.


Home Previous Next