<< Click to Display Table of Contents >> Navigation: User guide > Data > Multiple card records |
This section also applies to single card records with a card number.
This is the most common form of binary data. Where the data for a questionnaire cannot be held on a single card of 80 data locations, more than one card is required for each record. Providing all cards for a questionnaire contain a unique serial identifier in a fixed place, and each card type contains a unique numeric card type identifier in a fixed place, reading and allocating all cards in a record to their position in the card image area is as follows:
You define the serial identifier field in a SERIAL command, and the card identifier field and valid card identifiers in a CARD NUMBERS command. START DATA causes a new record to be read, and the cards transferred to the appropriate data locations: card type 1 to $101-180, type 2 to $201-280 and so on. FINISH DATA transfers control back to START DATA if there are any more records to be read. Note that individual card types do not all have to be present in each record, some may be specified as optional. CL leaves empty the appropriate buffers for cards that are missing.
For a data set with one card only per record with a sequence number in data locations 1-5 and the card number value 01 in data locations 6-7:
start control,
c=onlyone.csi,
finish control,
start data,
serial number in 1-5,
card numbers 1 in columns 6-7,
! variables defined from $101-180
...
finish data,
If we have a questionnaire with three card types numbered 1,2 and 3 in data location 6 and each questionnaire has a unique number in data locations 1-5, and the third card is optional.
start control,
c=three.cba,
finish control,
start data,
serial number in 1-5,
card numbers 1,2,/3/ in column 6,
! variables defined from $101-180,
! $201-280 and $301-380
! $301-380 are blank if there is no card 3
...
finish data,