<< Click to Display Table of Contents >> Navigation: Reference > Commands > COUNT |
The form of the COUNT command is:
COUNT x . text,
where x is a buffer or a field. Text may not be more than 40 characters in length.
The COUNT command is used at the Data Stage to generate a hole count or marginal frequencies for each data location in a designated buffer or field. This is a table showing for each card data location the number of records punched in each position V-9, and totals for the number of records punched at all, the number of the records blank, and the number of records with 1, 2 and 3 or more punches. This table is written to the Report file. It is headed by the text string.
If SELECT WR or SELECT WQ have been set then the variables selected will be used for weighting the data.
If buffer is specified, it must be specified in the CARD NUMBERS command. If neither buffer nor field is specified, then buffer 0 is counted ($1-$80).
Format option PRC indicates that raw counts are to be printed, and format DPT the number of decimal places required for them. Format RTT indicates that percentages (on the total number of records) are to be printed, and format DPR the number of decimal places required for them. Format PCS indicates that percentage signs are to be printed alongside percentages.
It should be noted that COUNT executes like any other command; if you jump over the COUNT command or filter certain records from the COUNT command, then these records will not be counted.
If the CARD CHARACTERS command has been used, x must be a field.
COUNT commands use a lot of RAM. If you have many COUNT commands you may need to split the CL script and do some at a time. We recommend that counts are done in a CL script on their own.
Examples of COUNT commands:
count 2.'Card 2',
count $1101-1180.'Count of card 11',
count $251-280.'Field count',