Text preview for : TIE5-0057_tapeIOCSadvNotes.pdf part of IBM TIE5-0057 tapeIOCSadvNotes IBM 140x TIE5-0057_tapeIOCSadvNotes.pdf



Back to : TIE5-0057_tapeIOCSadvNote | Home

llr~
TECHNJ[CAL TIE 5-0057
C INFORMATION February 17, 1965
EXCHANGE 34 pages

TO
I nternational Business Machines Corporation
~ 17 - 5 0 $7

IBM 1401 TAPE IOCS ADVANCED NOTES




Tom Scharf
IBM Corp .
D. P. Customer Education
Gladengvn. 3B, Etterstad
Oslo, Norway




FOR IBM INTERNAL USE ONLY


This paper is in the author's original form.
The objective in providing this copy is to
keep you informed in your field of interest.
Please do not distribute this paper to persons
outside the Company.




Distributed by
DPD Program Information Department
IBM Corporation
112 East Post Road TIE 5-0057
White Plains, New York
TITLE: IBM 1401 TAPE IOCS ADVANCED NOTES
AUTHOR: TOM SCHARF
DATE JANUARY 12., 1965. INTRODUCTION


These notes are designed to help programmers and others who desire a

DIREC T INQUIRIES TO : TOM SCHARF deeper knowledge of this IOCS system. This can then be used as the basis

IBM D. P. CUSTOMER EDUCATION for self-study or for a short course in advanced IOCS.

GLADENGVN. 3B, ETTERSTAD,
A sound understanding of the facts contained in this paper will help pro-
OSLO, NORWAY.
grammers to avoid common errors and misunderstandings as well as to
.better be able to analyze errors correctly and more quickly when they occur.

ABSTRACT: THIS PAPER IS THE RESULT OF EXPERIENCE WITH The notes are based on the author's own experience with several different
THIS PARTICULAR SYSTEM SINCE ITS ANNOUNCEMENT. non-overlap systems and purposely exclude areas which the author does not
THE APPROACH IS TO TAKE EACH DTF - example have extensive experience in such as overlap and printer DTF's.
WLRADDR - , EACH DIOCS STATEMENT AND EACH
MACRO INSTRUCTION AND EXPLAIN IN DETAIL ITS It is the authors conviction that senior programmers, systems engineers

IMPORTANCE IN THE TOTAL PROGRAM STRUCTURE. and others who have responsibility for solving special problems with and

AN EXPLANATION IS GIVEN OF HOW THE COMPILER for teaching this system will profit greatly by a detailed study of the IOCS

HANDLES EACH PARAMETER AND WHICH RESULTS - it is, after all, only one program with some minor variations but it is

EACH PARAMETER HAS, FOR EXAMPLE ON THE DTF used in virtually all programs of many installations and problems come up

TABLE OR THE DTF ROUTINE. COMMON ERRORS every day which can much more quickly be solved through a detailed know-

AND MISUNDERSTANDINGS ARE TAKEN UP IN LIGHT ledge of the system.

OF THESE FACTS AND CERTAIN EVALUATIONS ARE
This principle is valid for nn st programming systems to-day but since no
MADE AS TO THE ADVISABILITY OF USING OR NOT
programmer "has time" (read "makes time" or "takes time") then they
USING CERTAIN PARAMETERS. THE PAPER WAS
lose time and money in the long run.
ORIGINALLY WRITTEN AS AN INSTRUCTOR BACK-
GROUND FOR ORDINARY IOCS COURSES AND FOR' In preparation at present writing is an english translation of a table constructed
DIRECT USE ON AN ADVANCED IOCS COURSE. (in NOl'wegian) giving an explanation of virtually every single symbolic label
found in non-overlap IOCS, DIOCS and DTF routines. This is of course a
very useful analysis tool and has been in wide use for several years here
in Norway.




- i -
Table of Contents (cont. )




TABLE OF CONTENTS
PAGE SUBJECT

22 The Macros
PAGE SUBJECT 1. Get
23 l. Cont'.
The DTF Entries 24 2. Put
1. DTF File Name 25 3. Open
2. Filetype 26 4. Close
3. Chandrive 5. FEORL
4. Alttape 27 6. ReIse
5. Recform 28 7. RDLIN
2 6. Sizerec
7. Blocksize
3 8. IOAREAS
4 9. Typelabel
10. Checklabel
11. EOFADDR
5 12. WLRADDR
6 12. Cont.
7 12. Cont.
8 13. Workarea
14. Indexreg
15. Varbuild
9 16. Rewind
17. Totals
10 17. Cont.
II 18. Header
18. DTF Table for a Typical File
12 19. Reelseq
20. Serialnum
21. Padding
13 21. Cont.
14 22. Modepar
23. EX AD DR
15 23. Cont.
16 The DIOCS Entries
1. DIOCS
2. DIOCSORG
3. IODEVICES
4. Tapeuse
5. Features
17 6. Labeldef
18 6. Cont.
19 7. Counts
8. Altdrive
9. Exits
10. RWDOPTION
20 11. Readerror
21 11. Cont.


- iii -
- ii - cont.
The DTF Entries (cont. )
THE DTF E!\TRIES


If neither BLOCKED nor UNBLOCKED are specified then UN-
1. DTF File name
BLOCKED is assumed.
Should preferably contain the word FILE (example: INFILE,
i. e. This line is theoretically unnecessary for fixed unblocked
FILEAB) to avoid confusion when OPEN, GET, PUT and other
files but is very strongly recommended as fully filled out as this
macros are used.
strengthens documentation greatly and eliminates error possibi-
Is used by IOCS as the symbolic label on the first instruction in lities. It costs virtually nothing!
the corresponding DTF routine. This line is only used for tape and is extremely important - an
error here is "fatal" - it ruins the whole DTF because major
variations in the DTF routine as based on this line.
2. FILETYPE
For TAPE files. INPUT or OUTPUT must be specified since
these parameters are decisive for correct compilation. 6. SIZEREC
An error here ruins the whole DTF. Note the purpose of this entry is to give the IOCS routines infor-
This information will also be reflected on the DTF table at FILE- mation on the size of the data record - NB including possible
NAME-2 by a one-position code which is tested by DIOCS routines. record marks.
R=tape input, W=tape output, 1= reader, 4= punch, 2=printer. For fixed blocked records it is used for
a) increasing an internal accumulator ( }:t 2QOON) which starts

CHANDRIVE at 000 for the first data record and increases by the record
3.
length as given in SIZEREC for each GET or PUT until the
Any drive number from 0 to 9 is valid.
block is ended as signaled by a BCE test for a groupmark in
Two files may have the same number if they are not OPEN at the
same time. the next potential data record. A two-address SBR instruc-
tion is used to increase the count.
The result of the entry here is that it is placed on the DTF table
at FILENAME-3 (primarily for flip-flop use) and in the model I/O b) Ensuring correct padding-record length.

instruction on the four-line table at J11KOON. For fixed unblocked files this parameter is used to check

These two locations can easily be patched to modify drive number. record length (if WLRADDR).
For other files the author is not aware of any use lOCS makes
of this constant.
4. ALTTAPE
Errors during the first GET or during the CLOSE process
Any digit 0-9 is valid.
are often caused when SIZEREC does not correspond to the
Only result is that this entry is placed in the DTF table at loca-
DA used as lOAREA and the DA group mark is therefore not
tion FILENAME-4 which is normally blank.
positioned "correctly" causing loops stopped only by core
This location is tested at end of reel (IEOR on trailer) and
boundary.
swapped with the position at FILENAME-3 (which is used to deter-
mine drive number.
7. BLOCKSIZE
Only for blocked filesj total IOAREA DA length not including groupmark
5. RECFORM
desired.
If neither VARIABLE or FIXED is specified then FIXED will be
Used by IOCS:
assumed. a) For fixed blocked records is used to calculate the values of

- I - (cont.)
- 2 - (cont.)
The DTF Entries ( cont.)
The DTF Entries (cont. )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -. - - - - - - - - - - - -
9. TYPELABEL and
}:t ZQ and 114Q operands, these are not instructions. llZQ
10. CHECKLABEL
is actually an internal accumulator used to keep track of which
The result of this entry is restricted to a one position code On the
data record in the block is the current one and ']:lZQ is used
DTF table at FILENAME-5 and it is combined with the result of the
to update a possible INDEXREG between each GET or PUT.
CHECKLABEL entry to produce the code which is tested by the
l'.4Q is a constant used to reset ~ ZQ after a WRL condition
general label routine in DIOCS (moved then for DIOCS use to
so that the next GET will read a new block. The operand
IOCPSV -4) to determine the extent of label reading, writing and
value of the initial states of J::{ ZQ and ):{4Q are determined
checking necessary.
by setting them to (BLOCKSIZE - SIZEREC) and letting the
autocoder assembler calculate this difference. The reason The codes are:
for this is that the first GET after OPEN will thus be forced to
Standard - check all from input or check old output
read in a new tape block when l1ZQ is like this.
header.
At EOF J1ZQ will stand at "BLOCKSIZE" (so will INDEXREG
if one is assigned) thus it is necessary to reset ;:tZQ with the Standard - no checking of any part header or trailer.

aid of a RELSE if the file is to be re-opened! Standard-check IDENT and block count (on trailer).

For variable blocked output with V ARBUILD this parameter Blank No labels.
b)
is used to determine potential block size irrespective of actual Z Non-standard.
DA size.
A very important point to be noted here is that this code cannot be
c) For all blocked files this parameter is used to check record
changed at will to any of the others unless the correct routines are
length (WLRADDR must be specified for this check).
present in the DIOCS.
For complete code flexibility it would be necessary to specify
8. IOAREAS MIXED and CHECK in DIOCS LABELDEF. For example it is not
This is the area which will serve as input or output directly from possible to specify STANDARD in DIOCS and then change this code
tape. in the DTF table to blank in order to eliminate label reading. This
This parameter is a typical substitution type parameter which is does not work because all DTF's are assumed (STANDARD in
placed directly into several instruction operands in the DTF routine LABELDEF) to have standard labels thus no test is made at all for
any valid address form will do but any indexing used will be negated blank in this position. Similarly it is impossible to specify complete
( + X 0). checking by changing A to 1 if LABELDEF only has IDENT speci-
This is then usually a DA address as it is the first position of the fied. The routines simply don't exist!
input area which is needed. The DA must always have a group mark However it is possible to specify "downward" for example no
- on most file forms, this is a vital prerequisite to proper IOCS checking (A) instead of full checking (l) or no labels (bl) instead of
functioning. standard (1, A or J) if MIXED is specified. simply by patching.
The group mark is used to stop I/O operations but also to test for
a full block (F /B) and stop move-record instructions when work areas
11. EOFADDR
are used (F jul. The use IOCS compiler makes of this is simply to create a 3 position
It is possible for a careful programmer to patch - change this para- address constant on the corresponding DTF table (at FILENAME-7).
meter if it is forgotten or in error.
- 3 - (cont. )
- 4 - (cont.)
The DTF entries (cont. )

This area on the DTF table is normally a three position blank for b) The 1401 internally can skip a character cycle or take an
output files.
extra cycle during tape reading or writing thus extending or
contracting the record.
Any correction or change may be made to the three-position con-
stant by patching. No other changes are necessary. A missing c) Wrong tape mounted or wrong tape on wrong drive.
EOFADDR is thus very easy to correct without recompilation.
Any symbolic or actual address may b e used subject to the usual d) A previous program has inadvertantly written wrong length
rules for unsigned DCW address constants. records due to a groupmark word mark accidentally appearing
Thus an actual address must be specified in 3-position code (999 in the output area (esp. when using common I/O areas).
or N43 ) indexing is possible.
This address constant is moved up to the general D rocs routines The standard WLR routine which is generated individually for each
to a BOOO instruction at -Ji 2KOO 1 (not IOCRCL which deter- DTF routine and costs about 38 positions in core) tests in 151iluifll~

mines if it is EOF or EOR before branding to EOFADDR). whether or not the record length is exactly correct or not Is t i f c e-
An EOF ADDR accidentally specified for an output file is disre- -lse@!itu (jn tb 8 som hi) sed: I1m~"@ IIISeiS) the grol1p w a r k lift-
garded and no recompilation is necessary.


12. WLRADDR .];8 l011iiaHo; tesis,yful. I!owev~-tftis bas proved to be a ]Cery sorioue
This line is alvays optional however experience has shown that it
is abs31utely necessary on all input files (except variable unblocked It is psss-hlp to eke I Eol too 10115 tape lee Ids by a tittle a~

where no check is possible) due to the possibility among many ~i5Qgr?DlmiDgo. An extra groupmark wordrnark must be placed back
other things of electronic malfUnction. each IOAREA DA groupmark:

IOAREA DA 2xlOO.'
The check is carried out by a compare against a calculated con-
stant as compared to the B-register after the RT operation (=GM+l,
GM DA .~ '~I)G-
stored in IOC TBR). '2Dd *b QElI c6dihg l:cte.ii,j ga