IBM 1130 User Manual page 550

Computing system
Hide thumbs Also See for 1130:
Table of Contents

Advertisement

Al to A2 -- PACK
This conversion is very desirable if you wish to
store alphabetic data on the disk.
For input, output,
and editing, your data must be in Al format,
how-
ever, A2 format will pack twice as much data in an
equivalent number of words.
The PACK subroutine gives you the ability to con-
vert from Al to A2 format.
For example, suppose
the array IUNPK contains 123bGO:
IUNPK (1) contains an alphabetic 1
IUNPK (2) contains an alphabetic
2
IUNPK (3) contains an alphabetic 3
IUNPK (4) contains an alphabetic blank
IUNPK (5) contains an slphabetic G
IUNPK (6) contains an alphabetic
0
Now suppose we say
CALL PACK (IUNPK, 1,6, IPAKD, 1)
The data is packed and moved from IUNPK to IPAKD:
IPAKD (1) contains an alphabetic 1 and 2
IPAKD (2) contains an alphabetic 3 and blank
IPAKD (3) contains an alphabetic G and 0
The IUNPK array remains unchanged. An even num-
ber of characters will be packed.
Therefore, the
Al field should contain an even number of characters;--
otherwise, the last character in the IPAKD array
will be meaningless.
Section
Subsections
Page
70
40
I
10
05
A2 to AI.-- UNPAC
To convert A2 data back to AI, the UNPAC sub-
routine may be used. A typical call to UNPAC would
be
CALL UNPAC (IPAKD, 1,3, IUNPK, 1)
which would unpack the I23bGO packed in the pre-
vious example.

Advertisement

Table of Contents
loading

Table of Contents