Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-04 - decus/20-0108/cobedt.rno
There are 2 other files named cobedt.rno in the archive. Click here to see a list.
.LEFT MARGIN 0
.RIGHT MARGIN 65
.CENTER
COBEDT
.SKIP
.CENTER
A COBOL FILE EDITING PACKAGE
.SKIP
.INDENT 50
DAVE GORKA
.INDENT 50
25-JULY-76
.SKIP
.FILL
COBEDT IS A PROGRAM DESIGNED TO AID APPLICATION PROGRAMMERS
IN INTERPRETING AND PATCHING COBOL FILES WHOSE  ASCII OR SIXBIT RECORDS HAVE 
 IMBEDDED COMPUTATIONAL DATA ITEMS.
THE PROGRAM CAN BE RUN FROM EITHER BATCH OR TIMESHARING  AND
CONSISTS OF 2 DISTINCT PHASES.
.SKIP
.LEFT MARGIN 5
.INDENT -4
1. THE DESCRIPTION OF THE RECORD FORMAT FOR THE FILE TO BE EDITED.
.SKIP
.INDENT -4
2. THE MANIPULATION LANGUAGE THAT PERMITS THE PRINTING AND PATCHING
OF THE FILE.
.SKIP
.LEFT MARGIN 0
A DESCRIPTION OF THE COMMANDS CURRENTLY AVAILABLE FOR BOTH PARTS
FOLLOWS.
.SKIP 2
.CENTER
FILE DESCRIPTION
.SKIP
THE USER MUST ENTER THE FILE DESCRIPTOR COMMANDS IN ORDER TO 
PROCESS THE FILE.  THEY MAY BE ENTERED IN ANY ORDER.  
ANY VALUES THAT APPEAR IN LEFT AND RIGHT BRACKETS MAY BE
REPEATED AS NEEDED OR OMITTED FROM THE COMMAND.
ALL COMMAND PARAMETERS MUST BE SEPERATED FROM THE COMMAND
BY SPACES.
ALL COMMANDS MAY BE ABBREVIATED TO THE LAST SIGNIFICANT CHARACTER.
.SKIP
.INDENT 5
RECORD N
.SKIP
THE RECORD COMMAND TELLS COBEDT WHAT THE LENGTH OF THE RECORD IS IN POSITIONS.
THIS VALUE MUST BE PRESENT AND IS USED TO CHECK ON THE INTERNAL LENGTHS
FOR SIXBIT FILES.
.SKIP
.INDENT 5
BLOCK N
.SKIP
THE BLOCK COMMAND IS USED TO SPECIFY THE NUMBER OF RECORDS IN A 
BLOCK OF DATA IF THE DATA IS BLOCKED.  IF NOT, IT MAY BE OMITTED.
.SKIP
.INDENT 5
SIXBIT M:N[,M:N]
.SKIP
THE SIXBIT COMMAND TELLS COBEDT THAT THE POSITION RANGE(S)
GIVEN ARE IN SIXBIT.  
.SKIP
.INDENT 5
ASCII M:N[,M:N]
.SKIP
THE ASCII COMMAND INDICATES WHICH POSITIONS ARE IN ASCII IN THE FILE.
.PAGE
.INDENT 5
COMP [M[,N]]
.SKIP
THE COMP COMMAND INDICATES THAT A COMP FIELD FOLLOWS.
IF PARAMETERS ARE OMITTED, THE NEXT FULL WORD IS ASSUMED TO BE COMP.
IF M IS SPECIFIED, A COMP VALUE IS ASSUMED TO FOLLOW THE NEXT WORD AFTER POSITION M.
IF A SECOND NUMBER FOLLOWS M, THAT INDICATES THAT N COMP FIELDS OCCUR
FOLLOWING POSITION M.
IF M IS OMITTED AND N IS PRESENT (WITH ITS COMMA) N WORDS OF COMP ARE
ASSUMED TO FOLLOW.
.SKIP
.INDENT 5
COMP-2 [M[,N]]
.SKIP
THE COMP-2 COMMAND INDICATES THAT A DOUBLE PRECISION WORD FOLLOWS.
PARAMETERS MAY BE OMITTED IN WHICH CASE THE NEXT TWO WORDS ARE ASSUMED TO BE
DOUBLE PRECISION.
  THE IMPLICATIONS OF THE REST OF THE COMMAND ARE IDENTICAL TO
THE DESCRIPTION OF COMP.
.SKIP
.INDENT 5
FD <FILE SPEC>
.SKIP
THE FILE COMMAND IS PARTICULARLY USEFUL TO THE COBOL PROGRAMMER.
UNLIKE THE OTHER COMMANDS WHICH TEND TO DESCRIBE ANY DATA FORMAT, THE FILE COMMAND
IS USED TO SUBMIT A COBOL FILE DESCRIPTOR TO THE PROGRAM.  IN THIS WAY
THE COBOL PROGRAMMER DOES NOT HAVE TO CONVERT HIS FD TO THE RAW FORMAT
UNDERSTOOD BY COBEDT.  THE ONLY REQUIREMENTS FOR THE FD IS THAT IT HAS
BEEN PREVIOUSLY COMPILED BY COBOL AND SEPERATED FROM THE REST OF THE COBOL PROGRAM.  
AN EXAMPLE OF AN ACCEPTABLE FD IS GIVEN BELOW:
.SKIP
.NOFILL
.LEFT MARGIN 5
01	TAX-RECORD.
 02	SOCIAL-SECURITY-NBR.
   03	PART1			PIC X(3).
   03	PART2			PIC XX.
   03	PART3			PIC X(4).
 02	FIRST-NAME		PIX X(9).
 02	LAST-NAME OCCURS 10 TIMES INDEXED BY I.
   03	CHAR			PIC X.
 02	INCOME			PIC S9(8)V99 COMP.
 02	AGE			PIC S9(8)V99 COMP.
.LEFT MARGIN 0
.FILL
.SKIP
MOST COBOL FILE DESCRIPTORS ARE LEGAL TO COBEDT.
.SKIP
.INDENT 5
<BLANK>
.SKIP
THE DIALOGUE MODE IS TERMINATED BY A BLANK COMMAND LINE.
.SKIP
THE USER MAY TYPE HIS FILE DESCRIPTION COMMANDS INTO A INDIRECT COMMAND FILE AND SUBMIT IT TO COBEDT
VIA A '@' PRECEEDING THE FILE NAME.
.PAGE
AN EXAMPLE OF THE DIALOGUE MIGHT BE.
.SKIP 2
.NOFILL
.LEFT MARGIN 10
_.R COBEDT
COBEDT VERSION 1.0
ENTER COBOL FILE TO EDIT FOO.DAT
FD-RECORD 30
FD-SIXBIT 1:18
FD-COMP ,2
[email protected]
FD-
.FILL
.LEFT MARGIN 0
.SKIP 2
IN THE ABOVE DIALOGUE THE INPUT DATA FILE CONTAINING THE RECORDS TO BE
EDITED IS FOO.DAT.  THE USER DEFINES HIS RECORDS TO BE 
30 POSITIONS LONG, THE FIRST 18 OF 
WITCH ARE SIXBIT AND THE NEXT 12 ARE COMPUTATIONAL.  A INDIRECT
COMMAND FILE IS USED TO CONTAIN OTHER COMMANDS.  THE WHOLE INPUT SEQUENCE
IS TERMINATED BY A BLANK COMMAND.

.SKIP
THE USER IS PROMPTED BY THE 'FD-' WHEN COBEDT EXPECTS ANOTHER FILE DESCRIPTION
COMMAND.
.SKIP
SPECIAL NOTES:
.SKIP
THE ENTIRE RECORD DOES NOT HAVE TO BE DESCRIBED IN ORDER TO BE EDITED.
ONLY THOSE PORTIONS THAT THE PROGRAMMER WISHES TO USE.
FOR EXAMPLE:
.SKIP 
.NOFILL
.LEFT MARGIN 5
FD-SIXBIT 1:7
FD-COMP 84,2
FD-
.SKIP
.LEFT MARGIN 0
.FILL
THIS EXAMPLE WILL ALLOW EDITTING OF SIXBIT POSITIONS 1-7 AND  THE COMP FIELDS
IN POSITIONS 84-95.
.SKIP
THE MIXING OF ASCII AND SIXBIT IN RECORDS IS VERBOTEN IN COBOL
AND IS ALSO DISALLOWED BY COBEDT.
.SKIP
THE EDITING OF SEQUENTIAL FILES AND THE "IDA" PORTION OF ISAM FILES
IS ALLOWED ONLY IF THE USER KNOWS THE BLOCKING FACTOR OF THE RECORDS
IN THE FILE.  THIS FACTOR CAN BE DETERMINED BY DUMPING THE FILE ON THE LINE PRINTER.
.PAGE
.CENTER
MANIPULATION COMMANDS
.SKIP 2
WHEN THE FILE DESCRIPTOR DIALOGUE HAS BEEN COMPLETED THE
USER  ENTERS THE MAINPULATION LANGUAGE PHASE.  HERE THE 
USER MAY EDIT AND PRINT HIS FILE BY USING SOS TYPE COMMANDS.
THE FOLLOWING COMMANDS ARE AVAILABLE FOR FILE EDITING:
.SKIP
.INDENT 5
ALTMODE
.SKIP
A ALTMODE WILL MOVE THE USER ONE LINE UP IN THE FILE.
IF THE BEGINNING OF THE FILE IS REACHED, A ERROR MESSAGE 
IS GIVEN.
.SKIP
.INDENT 5
D<RANGE>
.SKIP
THE DELETE  COMMAND IS USED TO DELETE THE RECORDS IN THE RANGE SPECIFIED.
A RANGE MUST BE GIVEN IN ORDER FOR THE COMMAND TO OPERATE.
.SKIP
.INDENT	5
E<FILE-NAME>
.SKIP
EXIT FROM COBEDT  AND WRITE THE UPDATED FILE TO THE FILE SPECIFIED.
THE FILE NAME MAY BE OMITTED.
.SKIP
.INDENT 5
F<STRING>$ M:N,<RANGE>
.SKIP
FIND THE STRING SPECIFIED IN THE  POSITION  RANGE SPECIFED FOR THE
<RANGE> GIVEN.
IF THE POSITION RANGE CROSSES A DATA ITEM BOUNDARY, A ERROR MESSAGE IS
ISSUED.
.SKIP
.INDENT 5
I<RECORD NUMBER>
.SKIP
INSER A RECORD AFTER THE RECORD NUMBER GIVEN.  THE RECORD NUMBER MAY BE
ZERO (0) TO INSERT A LINE AT THE START OF THE FILE.  THE USER IS INTERROGATED
BY THE PROGRAM AS TO WHAT HE WISHES TO ENTER INTO THE 
POSITIONS DESCRIBED FOR THE RECORD FORMAT.
ANY UNDESCRIBED PORTIONS OF THE RECORD ARE ZEROED.
  AN ALTMODE WILL TERMINATE THE INPUT INTERROGATION
WITHOUT ENTERING THE CURRENT RECORD DATA.  A CARRAIGE RETURN TO THE INITIAL INSERT INTERROGATION WILL
TERMINATE INSERT MODE, INSERTING THE LAST RECORD.
.SKIP
.INDENT 5
L<FILE-NAME>
.SKIP
THE L COMMAND IS USED TO LIST ALL THE INQUIRES ABOUT THE FILE 
INTO THE FILE SPECIFIED.  THE USER MAY ISSUE THE L COMMAND AT ANY TIME
IN HIS INTERROGATION OF THE FILE.  THE  COMMAND MAY BE USED
WITH TTY: TO BREAK FROM A PREVIOUS OUTPUT FILE TO THE TERMINAL.
THE DEFAULT LIST DEVICE IS THE TERMINAL.
.SKIP
.INDENT 5
LINEFEED
.SKIP
A LINE FEED WILL MOVE THE USER DOWN ONE RECORD IN THE FILE.
.PAGE
.INDENT 5
P<RANGE>
.SKIP
THE P OR PRINT COMMAND IS USED TO PRINT  OUT THE RECORD RANGE SPECIFIED.
.SKIP
.INDENT 5
R<STRING>$ M:N 
.SKIP
REPLACE THE STRING FOUND IN THE POSITION RANGE SPECIFIED WITH THE STRING GIVEN
IN THE COMMAND.
.SKIP
.INDENT 5
S
.SKIP
THE SCALE COMMAND IS USED TO SHOW THE LAYOUT OF THE RECORD.  TWO LINES
OF OUTPUT ARE PRODUCED.  THE FIRST CONSISTS OF:
.LEFT MARGIN 5
.NOFILL
.SKIP
A - ASCII DATA POSITION
S - SIXBIT DATA POSITION
1 - COMP FIELD
2 - DOUBLE PRECISION COMP FIELD
.SKIP
.FILL
.LEFT MARGIN 0
THE SECOND LINE OF THE SCALE  CONSIST OF THE RECORD POSITIONS ON A NUMBER SCALE FOR EASY REFERENCE.
.SKIP 1
NOTE:
.NOFILL
.LEFT MARGIN 5
<RANGE> = N       OR
          M:N
.FILL
.LEFT MARGIN 0
.SKIP
M AND N MAY BE INTEGERS WITH M<N.  M MAY BE A '.' TO INDICATE 
THE CURRENT POSITION.
.LEFT MARGIN 5
.SKIP
$       = ALTMODE
.FILL
.LEFT MARGIN 0
.PAGE
.CENTER
MANIPULATION EXAMPLE
.SKIP
A MANIPULATION EXAMPLE FOR THE DATA DESCRIPTION GIVEN ABOVE
IS GIVEN.
.LEFT MARGIN 5
.SKIP 2
.NOFILL
FD-
ENTER OUTPUT FILE FOO.NEW
ML-S
REC _# SSSSSSSSSSSSSSSSSS 1 1 1 1 1 1 1 1 1 1 1 1
      123456789012345678 9 0 1 2 3 4 5 6 7 8 9 0
ML-P1:5
   1. 19000000311                  0        7400
   2. 19020110                     0           0
   3. 19020112                     0           0
   4. 19020120                     0           0
   5. 19020125                     0           0
ML-F7400$25:30,1:5
   1. 19000000311                  0        7400
ML-R7401$25:30
ML-P1
   1. 19000000311                  0        7401
ML-EFOO.OTH
.SKIP 2
.FILL
.LEFT MARGIN 0
IN THE ABOVE EXAMPLE THE USER LEAVES FILE DESCRIPTOR MODE AND ENTERS
THE MANIPULATION LANGUAGE MODE.  HERE THE USER MUST ENTER THE 
OUTPUT FILE NAME (FOO.NEW), LATER CHANGED ON THE EXIT COMMAND TO FOO.OTH.
THE USER IS PROMPTED TO ENTER COMMANDS BY THE 'ML-' IN THE 
LEFT MARGIN.
THE FIRST COMMAND PRINTS THE SCALE WHICH IS THE INTERNAL REPRESENTATION OF THE RECORD.
   THE SECOND COMMAND PRINTS
THE FIRST 5 LINES (RECORDS) IN THE FILE.   THEN A SEARCH ('F' COMMAND) IS MADE OF RECORDS 1 TO 5 ON POSITIONS
25 TO 30 (COMP FIELDS).  THE USER THEN CHANGES ('R' COMMAND) THE 
CONTENTS OF THE COMP FIELD IN POSITIONS 25 TO 30 TO 7401 AND PRINTS THEM.
  A EXIT IS DONE SPECIFYING FOO.OTH AS THE OUTPUT FILE NAME.
.PAGE
.CENTER
CONVERTING COBOL A COBOL RECORD DESCRIPTOR
.SKIP
A TYPICAL COBOL RECORD DESCRIPTOR FOLLOWS:
.SKIP 2
.NOFILL
.LEFT MARGIN 5
01 TAX-RECORD.
 03	SOCIAL-SECURITY-NBR	PIC X(9).
 03	FIRST-NAME		PIX X(9).
 03	LAST-NAME		PIC X(5).
 03	INCOME			PIC S9(8)V99 COMP.
 03	AGE			PIC S9(8)V99 COMP.
.SKIP 2
.LEFT MARGIN 0
.FILL
THIS COBOL RECORD DESCRIPTION WOULD HAVE A COBEDT FILE DESCRIPTION
IN THE FOLLOWING FORMAT:
.SKIP 2
.NOFILL
.LEFT MARGIN 5
RECORD 35
SIXBIT 1:9,10:24
COMP ,2
.SKIP 2
.LEFT MARGIN 0
.FILL
.INDENT 50
(END OF RNO)