COUNT sub-command
Defines the segment and special processing options for the purpose of counting selected segments, extracting the concatenated keys of selected segments, or both.
OPTION | Defines special processing.
|
For more information, see Processing-paths.
Examples
The following COUNT sub-command statement counts all customer and customer remarks segments and writes out the concatenated key for the customer segment.
PSB DBNAME=CUSTPDBD;
SET OUTPUT=CUSTKEYS;
TITLE LINE01=’COUNT ALL CUSTOMER AND REMARKS SEGMENTS’;
SELECT SEGMENT=CUSTOMER MAX=ALL
SEGMENT=CUSTRMKS MAX=ALL
COUNT SEGMENT=CUSTOMER OPT=CKEY
SEGMENT=CUSTRMKS;
In the following example, the COUNT sub-command statement counts and writes the concatenated key of every 100th customer segment to an output dataset PDS member.
PSB PCB=2;
SET OUTPUT=CUSTKEYS;
SELECT SEGMENT=CUSTOMER MAX=ALL START=100 SKIP=(1,99)
COUNT SEGMENT=CUSTOMER OPT=CKEY;
Related topics