United States

Department of RECAL:

Agriculture

A Computer Program for Selecting Sample Days

Southeastern Forest for Recreation Use Estimation Experiment Station

by D. L. Erickson, C. J. Liu, H. K. Cordell,and W. L. Chen

Forest Service

General Technical Report

SE-19
September 1980

Southeastern Forest Experiment Station

Asheville, North Carolina
RECAL:

A Computer Program for Selecting Sample Days

for Recreation Use Estimation

D. L. Erickson, C. J. Liu, H. K. Cordell, and W. L. Che&'

-ll D. L. Erickson and C. J. Liu are Assistant Professors, Department

of Forestry, University of Kentucky, Lexington, Kentucky; H. K. Cordel1 is

Project Leader, Forest Recreation Research, Southeastern Forest Experiment

Station, U.S. Forest Service, Athens, Georgia; and W. L. Chen is Graduate

Assistant, Department of Computer Science, Uni-versity of Kentucky, Lexington,

Kentucky.

RECAL:

A Computer Program for Selecting Sample Days

for Recreation Use Estimation

D. L. Erickson, C. J. Liu, H. K. Cordell, and W. L. Chen

ABSTRACT .--Recreation Calendar (RECAL) is a computer

program in PL/I for drawing a sample of days for estimating recreation use. With RECAL, a sampling

period of any length may be chosen; simple random,

stratified random, and factorial designs can be

a¿commodated. The program randomly allocates days

to strata and locations.

Federal and State land management agencies must regularly and reliably

estimate visitor use of recreation areas under their control. Only in

this way can funds be appropriately allocated among recreation areas and

needs for expansion discovered. Various methods of data collection and

analysis are employed, depending upon the sorts of information needed,

but most methods require observation on a certain number of randomly

selected days. This report describes a computer program for random

selection of samplíng days.

The program, called RECAL, is written in PL/I. The Appendix of this

report contains a complete listing of RECAL. This program is designed to

accommodate simple random sampling in which al1 days are treated alike,

stratified random sampling in which high use days and low use days are

placed in different strata, or factorial designs. The program can produce:

1. A Gregorian calendar for the sampling period desired."

2 . A schedule of sample days by calendar day, day of the week, and site

location.

3 . The number and percentage of sample days allocated to each location

and stratum.

Program Input

To use RECAL, two decisions must be made--the length of sampling period

and the sampling design. The sampling period can be as long or short as

desired, but it must be continuous.

21 The construction of the Gregorian calendar is based on formulas

given by H. E. Licks, 1917, Recreations in mathematics, D. Van Nostrand Co.,

New York, 155 p.
2

In selecting the sampling design, strata and sampling intensity must

be specified. Recreation use in RECAL may be conveniently divided into

two strata: stratum A (heavy use days) and stratum B (light use days).

A simple random sampling will be performed within each stratum according

to the sampling intensity specified. A particular day chosen for sampling

will then be randomly allocated to a sampling location.

Control Cards

One control card and one or more name cards are required. Each data

field should be separated by one or more blank columns. Table 1 shows an

example of the input cards required.

Field Number One is named START. It specifies the beginning of the

sampling period by up to two-digit codings for month and day of the month,

and a four-digit coding for the year, in that order. Each is separated

from the others by either a comma or a blank.

Field Number Two, named END, specifies the ending date of the sampling

period. It is ceded the same as Field Number One.

Field Number Three, named LOC, specifies the total number of sampling

locations.

Field Number Four, named LEVEL, defines the stratum or the leve1 of

use for the particular day of the week. In the program, the first day of

the week is designated as Sunday and the last day as Saturday. Users should

code the digit 0 to designate a heavy use day and the digit 1 a light use

day. Days of the week are separated by commas and are ceded in order.

When simple random sampling design is desired, al1 days should be ceded

by 0's.

Field Number Five, named MODEL, specifies the particular sampling

design to be used. Code 1 for simple random sampling, 2 for stratified

random sampling, and 3 for factorial design.

Field Number Six is named INTEN. The coding of this field depends on

the particular sampling design:

1. Simple random sampling-- To indicate the sampling intensity, the

user may choose to use either the sample size or the percentage

of the population to be sampled. For example, a sampling intensity

of 20 percent would be ceded in INTEN as .20, while the sample size

will be ceded as an integer.

2 . Stratified random sampling-- Coding is the same as simple random

sampling.

3 . Factorial design--1NTEN is ceded by the total number of sample

days as a negative integer variable (e.g.,-20). This number

should be divisable by the number of sample locations since an

equal number of observations is assumed for the factorial design.
Field Number Seven is named CALDR. If specified, the program will

produce a Gregorian calendar of the years covering the sampling period.

Code 1 if yes, 0 if no.

Field Number Eight is called NAME. If specified, the program will

produce a listing of the names of the sampling locations. Code 1 if yes

and 0 if no.

Field Number Nine is called HEAVY. This field allows the user to

designate other known heavy use days (e.g.,national holidays, local

festivals) not covered by Field Number Four. If no heavy use days occur

during the specified sampling period, the user should code the field 0

(zero).

Name Cards

For inputing names, location names must be ceded in quotation marks

and separated by blanks (table 1). The name cards should follow the control

card.

Heavy Use Cards

The specific dates of expected heavy use days should be ceded on

Heavy Use Cards that follow the Name Card in the input stream (table 1).

Each expected heavy use day is ceded by either a one- or two-digit number

for the month and for the day of the month, and a four-digit number for

the year, in that order. Two or more heavy use days are separated by

blanks.

Program Output

The program uses a random number generator to select the sample days,

and randomly allocates these days to different locations. An example of

the RECAL program output is shown in table 2.

The program first prints out a summary of the sampling plan, which

verifies the input specified on the control card. In this example, the user

has chosen a stratified random sampling with a period starting on

November 29, 1979, and ending on January 30, 1980. Stratum A defines the

heavy use days and stratum B defines the light use days. The number of

available sampling days for each stratum is printed and each stratum will

be sampled at an intensity of 20 percent. There are six sampling locations.

Based on the number of available days in each stratum, 4 heavy use days and

9 light use days were chosen. Each of these days were randomly allocated

to one of the six locations.

The program then prints out a sampling schedule. In the sampling

schedule, the sample days are listed sequentially by calendar date, day

of the week, and location. Optionally, the name of the location can be

printed.

Following the sampling schedule, a printout of the number and percentage

of sample days allocated to the specified locations and to each stratum is given.
4

Table 1. --An example of input cards for RECAL

Control Card Format

Field Field

Number Name Code Explanation of Code

1 START

2 END

3 LOC

11,29,1979 Starting date is Nov. 29, 1979

1,30,1980 Ending date is Jan. 30, 1980

6 Six sampling locations

4 LEVEL 0,1,1,1,1,1,0 Heavy use days are Sun. and Sat.

Light use days are Mon., Tues.,

Wed., Thurs., and Fri.

5 MODEL 2 Stratified random sampling

6 INTEN .20 Sampling intensity is 20%

7 CALDR 0 No calendar printed

8 NAME 1 Print location names

9 HEAVY 1 . One heavy use day specified

Control Card Image

11,29,1979 1,30,1980 6 O,l,l,l,l,l,O 2 .20 0 1 1

Name Card Images

'Road 23' 'Pine Ridge' 'Tunnel Ridge Road' 'CCC Camp'

'Koomer Ridge' 'Nada Tunnel'

Heavy Use Card Image

12,25,1979
5

Table 2 .--An example of RECAL output

********************************

* SUMMARY OF SAMPLING PLAN *

* FOR STRATIFIED RANDOM SAMPLE *

********************************

SAMPLING PERIOD: NOV 29 1979-JAN 30 1980

DEFINITION OF STRATA

STRATUM A: SUN SAT

STRATUM B: MON TUE WED THU FRI

SAMPLING INTENSITY: 20.00%

NO. OF DAYS IN STRATUM A: 1 9

NO. OF DAYS IN STRATUM B: 4 4

NO. OF SAMPLING LOCATIONS: 6

***************************************************

* SAMPLING SCHEDULE FOR NOV 29 1979 - JAN 30 1980 *

***************************************************

DATE DAY LOCATION

_____------____-_----------------------------

NOV 2 9

DEC 1

DEC 6

DEC 2 0

DEC 2 2

DEC 2 4

JAN 2

JAN 4

JAN 1 0

JAN 1 7

JAN 2 0

JAN 2 6

JAN 2 9

THU

SAT

THU

THU

SAT

MON

WED

FRI

THU

THU

SUN

SAT

TUE

4 ccc CAMJ?

6 NADA TUNNEL

4 ccc CAMP

2 PINE RIDGE

5 KOOMER RIDGE

6 NADA TUNNEL

5 KOOMER RIDGE

6 NADA TUNNEL

1 ROAD 23

1 ROAD 23

1 ROAD 23

3 TUNNEL RIDGE ROAD

6 NADA TUNNEL

***********************************

* SAMPLING ALLOCATION BY LOCATION *

***********************************

LOCATION SAMPLE SIZE PERCENTAGE

_____-_---------------------- -v-m--

1 3 23.08%

2 1 7.69%

3 1 7.69%

4 2 15.38%

5 2 15.38%

6 4 30.77%

**********************************

* SAMPLING ALLOCATION BY STRATUM *

**********************************

STRATUM SAMPLE SIZE PERCENTAGE

A 4 6.35%

B 9 14.29%
APPENDIX

Listing of Source Deck

1SAMPLE:PROCEDURE OPTIONS(MAIN);

DCL NAMES(ISITE) CHAR(20) CONTROLLED;

DCL DAYS(HVY,3) FIXED BIN CONTROLLED;

DCL (RAN,RATE,RAM) FLOAT BIN(31);

DCL SEED FLOAT(16);

DCL (START(3),END(3),TEST,T,ISITE,DET(7),SDAY(2),OPTIONl,OPTION2,

STOP(4),M,N,K,CURRENT_DAY,NN,TOT~,IDAY(2),OPTION3,HVY,~AG,

I,J,CURRENT_MO,CURRENT_YR WK) FIXED BIN (31);

DCL MO(12) FIXED BIN(31) 1N1T(31,28,31,30,31,30,31,31,30,31,30,31);

DCL FWD(12) FIXED BIN(31) INIT(365,334,306,275,245,214

,184,153,122,92,61,31);

DCL BWD(12) FIXED BIN(31) 1N1T(0,31,59,90,120,151,181,

212,243,273,304,334);

DCL DAY(7) CHARACTER(3) INIT('SUN','MON','TUE','WED','THU','FRI',

'SAT');

DCL MONTH(12) CHARACTER(3) INIT ('JAN','FEB','MAR','APR','MAY','JUN',

'JUL','AUG','SEP','OCT','NOV','DEC');

DCL (WEEKEND,WEEKDAY)FLOAT(6);

DCL (FIXED,MOD,SUM,PROD,ABS) BUILTIN;

DCL LEAP ENTRY(FIXED BIN(31),FIXED BIN(31));

DCL WEEK ENTRY(FIXED BIN(31),FIXED BIN(31),FIXED BIN(31));

DCL RANDM ENTRY(FLOAT(16),FIXED BIN(31),FLOAT BIN(31));

GET LIST(START,END,ISITE,DET,OPTION3,RATE,OPTIONl,OPTION2,H~);

IF HVY > 0 THEN DO; ALLOCATE DAYS;

GET SKIP LIST(DAYS);

END;

ALLOCATE NAMES;

IF OPTION2=1 THEN DO;

GET SKIP LIST(NAMES);

END;

ELSE NAMES=";

IF ((START(3)>END(3))I(ST~T(3)=END(3)&START(l)>END(l)) 1

(START(3)=END(3)&START(l)=END(l)&START(2)>END(2)))

THEN DO; PUT LIST('STAl¿TING DATE IS GREATER THAN ENDING

DATE, JOB ABORTED'); STOP; END;

MO(2)=29; RAM=l.;

IF(STAI¿T(l)>12 1 START(Z)>MO(START(l)) 1

END(1)>12 1 END(2)>MO(END(l))) THEN

DO; PUT LIST ('ERROR IN THE DATES SPECIFIED, JOB ABORTED');

STOP; END;

IF ISITE<l THEN DO;

PUT LIST ('NOT ENOUGH LOCATION, JOB ABORTED');

STOP; END;

IF SUM(DET)>7 THEN DO;

PUT LIST ('ERROR IN THE LEVEL' SPECIFIED, JOB ABORTED');

STOP; END;

IF OPTION3=1 THEN IF ( SUM(DET)-=0) THEN DO;

PUT LIST(' ERROR IN THE LEVEL SPECIFIED; JOB ABORTED');

STOP; END;

IF (OPTION3=3 & MOD(RATE,ISITE)-r=O) THEN DO;

PUT LIST(' ERROR IN THE INTENSITY SPECIFIED; JOB ABORTED');

STOP; END;

IF OPTIONl-0 THEN GO TO SA;

PUT EDIT((lOO)'*')(PAGE,A); '
DO 1=1 TO END(3)-START(3)+1;

PUT SKIP(lO);

PUT EDIT (START(3)+1-1) (COL(34),F(4));

DO J-l TO 4;

PUT SKIP(3);

SELECT;

WHEN(J=l) PUT LIST(' JANUARY FEBRUARY',

, MARCH');

WHEN(J=2) PUT LIST(' APRIL MAY', # JUNE');

WHEN(J=3) PUT LIST(' JULY AUGUST',

, SEPTEMBER');

WHEN(J=4) PUT LIST(' OCTOBER NOVEMBER',

, DECEMBER');

END;

PUT SKIP LIST(' SMTWTFS SM T W T F S',

I S M T W T F S');

CALL LEAP(START(3)+1-l,T);

PUT SKIP;

DO M=l TO 3;

IF M+3*(J-1)>2 THEN CALL WEEK(START(3)+1-l,BWD(M+3*(J-l))+T+l,WK);

ELSE CALL WEEK(START(3)+1-l,BWD(M+3*(J-1))+1,WK);

IF WK=O THEN WK=WK+7;

STOP(M)=8-WK;

DO N-l TO STOP(

PUT SKIP(0) EDIT(N)(X((M-1)*25+(WK-1)*3+(N-1)*3),F(3)); END;

END;

IF T-=0 THEN MO(2)=29; ELSE MO(2)=28;

DO K=l TO 5;

PUT SKIP;

DO M=1 TO 3;

STOP(M)=STOP(M)+7; NN=O;

IF STOP(M)cMO(M+3*(J-1)) THEN DO; DO N=STOP(M)-6 TO STOP(

PUT SKIP(0) EDIT(N)(COL(l+(M-1)*25+NN*3)

,F(3)); NN=NN+l; END; END;

ELSE IF STOP(6<=MO(M+3*(J-1))

THEN DO; DO N=STOP(M)-6 TO MO(M+3*(J-1));

PUT SKIP(0) EDIT(N)(COL(l+(M-1)*25+NN*3)

,F(3)); NN=NN+l; END; END;

END;

EM);

END;

END;

SA: MO(2)=28;

TOTAL=(END(3)-START(3)+1)*366;

BEGIN;

DCL (SAMPLE_DAY(2,TOTAL,7),SITE(ISITE)) FIXED BIN (31);

IF START(1)<=2 THEN TOTAL=BWD(START(l))+START(2);

ELSE DO; CALL LEAP(START(3),T);

TOTAL=BWD(START(l))+START(2)+T;

END;

CALL WEEK(START(3),TOTAL,WK);

IF WK=O THEN WK=WK+7;

CURRENTJAY=START(2); CURRENTJO=START(l); CURRENT-YR-START(3);
8

IDAY-1; TOTAL=O; SAMPLE>AY(*,*,ó)=O;

DO WHILE ((CURRENT-yRtEND(3)) 1 ((CURRENT_YR=END(3)) &

(CURRENT-MO<END(l))) 1 ((CURRENT_YR=END(3)) &

(CURRENT_MO=END(l)) & (CURRENT_DAY<=END(2))));

TOTAL=TOTAL+l;

FLAG=O;

IF HVY=O THEN GO TO NOR;

ELSE DO;

DO I=l TO HVY;

IF CURRENT YR=DAYS(I,3) & CURRENT>O=DAYS(I,l)

& CURREÑT-DAY=DAYS(I,2) THEN DO;

FLAG=l;

SAMPLE_DAY(l,IDAY(l),l)=CURRENT-MO;

SAMPLE-DAY(l,IDAY(1),2)=CURRENT_DAY;

SAMPLE_DAY(l,IDAY(1),3)=CURRENT_YR;

SAMPLE_DAY(l,IDAY(1),4)=WK;

SAMPLE_DAY(l,IDAY(l),7)=TOTAL;

IDAY(l)=IDAY(l)+l; WK=WK+l;

GO TO NOR;

END;

END;

END;

NOR: IF FLAGq-1 THEN DO;

SAMPLE_DAY(DET(WK)+l,IDAY(DET(WK)+l),l)=CURRENT>O;

SAMPLE_DAY(DET(WK)+l,IDAY(DET(WK)+1),2)=CURRENT-DAY;

SAMPLE_DAY(DET(WK)+l,IDAY(DET(WK)+1),3)=CURRENT~yR;

~AMPLE_DAY(DET(wK)+~,IDAY(DET(wK)+~),~)=wK;

SAMPLE_DAY(DET(WK)+l,IDAY(DET(WK)+l),7)=TOTAL;

IDAY(DET(WK)+l)=IDAY(DET(WK)+l)fl; WK=WK+l;

END;

IF WK>7 THEN WK=l;

CALL LEAP(CURRENT-YR,T);

IF T=l THEN MO(2)=29;

ELSE MO(2)=28;

CURRENT-DAY=CURRENT>AY+l;

IF CURRENT_DAY>MO(CURRENT_MO) THEN DO;

CURRENT-DAY-1;

CURRENT_MO=CURRENT>O+l;

IF CURRENT MO>12 THEN DO;

CURRENT MO=l;

CURRENT~yR=CURRENTYR+l;

END;

END;

END;

IDAY=IDAY-1; SITE=O;

IF OPTION3=2 THEN DO; IF RATE>l THEN

SDAY=RATE/TOTAL*IDAY+.S;

ELSE SDAY=RATE*IDAYf.s;

END;

IF OPTION3=1 THEN DO; IF RATE<l THEN J=RATE*TOTAL+.S;

ELSE J=RATE;

END;

IF OPTION3=3 THEN SDAY=RATE/2;

IF(SDAY(l)>IDAY(l) ( SDAY(2)>IDAY(2)) THEN DO;
9

PUT LIST(' MAXIMUM NO. OF SAMPLE DAYS EXCEEDED, JOB ABORTED');

STOP;

END;

SEED=2*(START(3)*lOOO+START(2)*lOO+START(l)*lO)+ll;

IF OPTION3=1 THEN DO;

SDAY=O;

DO I=l TO J;

RB: CALL RANDM(SEED,l,RAN);

IF RAN>IDAY(l)*RAM/TOTAL THEN N=2; ELSE N=l;

CALL RANDM(SEED,l,RAN);

K=RAN*IDAY(N)+l;

IF SAMPLE_DAY(N,K,6)=1 THEN W TO RB;

ELSE SAMPLE>AY(N,K,6)=1;

CALL RANDM(SEED,l,RAN);

SDAY(N)=SDAY(N)+l;

SAMPLE_DAY(N,K,5)=ISITE*RAN+l.;

DO M=l TO ISITE;

IF SAMPLE_DAY(N,K,5)=M THEN

SITE(M)=SITE(M)+l;

END;

END;

END;

ELSE DO;

DO I=l TO 2;

DO J=l TO SDAY(1);

RA:CALL RANDM(SEED,l,RAN);

K=RAN*IDAY(I)+l;

IF SAMPLE~DAY(I,K,G)=l THEN GO TO RA; ELSE SAMPLE~AY(I,K,6)=1;

IF OPTION3=3 THEN SAMPLE~AY(I,K,5)=MOD(J+(I-l)*SDAY(l),ISITE)+l;

ELSE DO;

CALL RANDM(SEED,l,RAN);

SAMPLE_DAY(I,K,5)=ISITE*RAN+l;

END;

DO M=l TO ISITE;

IF SAMPLE_DAY(I,K,5)=M THEN SITE(M)=SITE(M)+l;

END;

END;

EM);

END;

PUT SKIP EDIT((34)'*')(PAGE,X(14),A);

PUT SKIP EDIT('*','*')(X(14),A,X(32),A);

PUT SKIP LIST(' * SUMMARY OF SAMPLING PLAN *');

IF OPTION3=1 THEN

PUT SKIP LIST(' * FOR SIMPLE RANDOM SAMPLE *');

IF OPTION3=2 THEN

PUT SKIP LIST(' * FOR STRATIFIED RANDOM SAMPLE *');

IF OPTION3=3 THEN

PUT SKIP LIST(' * FOR FACTORIAL DESIGN *'>;

PUT SKIP EDIT('*', '*') (X(14) ,A,X(32) ,A);

PUT SKIP EDIT((34)'*')(X(14),A);

PUT SKIP(5) EDIT(' SAMPLING PERIOD:',MONTH(START(l)),START(2),

START(3),'-' ,MONTH(END(l)),END(2),END(3))

(COL(l6),A,A(3),F(3>,Fo,A,A(3),F(3),F(5));

PUT SKIP(2) (' DEFINTION OF STRATA');
10

PUT SKIP(2) EDIT ('STBATUM A:')(COL(27),A);

K=O;

DO I-l TO 7;

IF DET(I)=O THEN DO; PUT EDIT(DAY(I))(COL(38+K*4),A(3));

K=K+l;

END;

END;

PUT SKIP(2) EDIT ('STRATUM B:')(COL(27),A);

K=O;

DO 1 = 1 TO 7;

IF DET(I)=l THEN DO; PUT EDIT(DAY(I))(COL(38+K*4),A(3));

K=K+l;

END;

END;

IF RATE>l THEN

PUT SKIP(2) EDIT(' SAMPLING INTENSITY:',

RATE*lOO./TOTAL,'%')

(COL(25),A,F(6,2>,A);

ELSE

PUT SKIP(2) EDIT(' SAMPLING INTENSITY:',RATE*l00.,'%')

(COL(25>,A,F(6,2),A);

PUT SKIP(2)EDIT(' NO. OF DAYS IN STRATUM A:',IDAY(l))(COL(25),A,F(5));

PUT SKIP(2)EDIT(' NO. OF DAYS IN STRATUM B:',IDAY(2))(COL(25),A,F(5));

PUT SKIP(2)EDIT(' NO. OF SAMPLING LOCATIONS:',ISITE)(COL(25),A,F(3));

PUT PAGE EDIT ((53)'*')(X(14),A);

PUT SKIP EDIT('*', '*') (X(14) ,A,X(51) ,A) ;

PUT SKIP EDIT('* SAMPLING SCHEDULE FOR',MONTH(START(l)),START(2),

START(3),' - ',MONTH(END(l)),END(2),END(3),'*')

(COL(15>,A,X(1),A(3),Fo,F(5),A,Ao,F(3~,~~~~,~~~~,~~;

PUT SKIP EDIT('*', '*')(X(l4),A,X(5l),A>;

PUT SKIP EDIT((53)'*')(X(14),A);

IF OPTION2=0 THEN PUT SKIP(5) EDIT('DATE DAY LOCATION')

(COL(18) ,A) ;

ELSE PUT SKIP(5)EDIT('DATE DAY LOCATION')

(COL(18),A);

PUT SKIP EDIT((45)'-')(X(l4),A);

PUT SKIP(2);

DO 1=1 TO TOTAL;

DO J=l TO 2;

DO K= 1 TO IDAY(

IF SAMPLE_DAY(J,K,7)>1 THEN GO TO IJ;

IF SAMPLE_DAY(J,K,7)=I & SAMPLE-DAY(J,K,á)=l

THEN DO;

PUT SKIP(l);

PUT EDIT(MONTH(SAMPLE_DAY(J,K,l)),

SAMPLE_DAY(J,K,2),

DAY(SAMPLE>AY(J,K,4)),

SAMPLE_DAY(J,K,5),

NAMES(SAt4PLE_DAY(J,K,5)))

(COL(16) A(5) ,F(2) ,X(5) d(8) ,F(3) ,X(3) ,A(20)) ;

GO TO KK;

END;

END;

IJ:END;
1 1

KK:END;

PUT PAGE EDIT((37)'*')(X(14),A);

PUT SKIP EDIT('*', '*') (X(14) ,A,X(35),A);

PUT SKIP LIST(' * SAMPLING ALLOCATION BY LOCATION *');

PUT SKIP EDIT('*','*')(X(l4),A,X(35),A);

PUT SKIP EDIT((37)'*')(X(14),A);

PUT SKIP(5) EDIT (' LOCATION SAMPLE SIZE PERCENTAGE')

(COL(14).A);

PUT SKIP EDIT((36)'-')(X(14),A);

DO 1=1 TO ISITE;

PUT SKIP(2) EDIT(I,SITE(I),SITE(I)*lOO.*RAM/SUM(SDAY),'%')

(COL(l7) ,F(3) ,F(12),F(13,2) ,A) ;

END;

PUT PAGE EDIT ((36)'*')(X(14),A);

PUT SKIP EDIT ('*','*')(X(14),A,X(34),A);

PUT SKIP LIST(' * SAMPLING ALLOCATION BY STRATUM *');

PUT SKIP EDIT('*', '*') (X(14) ,A,X(34) ,A);

PUT SKIP EDIT((36)'*')(X(14),A);

PUT SKIP(5) EDIT ('STRATUM SAMPLE SIZE PERCENTAGE')

(COL(16) PA);

PUT SKIP EDIT((36)'-')(X(14),A);

PUT SKIP(2) EDIT(' A',SDAY(l),SDAY(l)*lOO.*RAM/TOTAL,'%')

(COL(l6>,A,F(12),F(13,2),A);

PUT SKIP(2) EDIT(' B',SDAY(2),SDAY(2)*lOO.*RAM/TOTAL,'%')

(COL(l6) ,A,F(l2) ,F(l% 2) 4);

END;

END ISAMPLE;

*PROCESS,A,X,AG,FLOW;

LEAP:PROCEDURE(TEST,N) ;

DCL (TEST, N) FIXED BIN(31);

IF MOD(TEST,4)7=0 THEN N=O;

ELSE IF(MOD(TEST,lOO)=U & MOD(TEST,400)-=0)

THEN N=O;

ELSE N=l;

RETURN;

END LEAP;

*PROCESS,A,X,AG,FLOW;

WEEK:PROCEDURE(X,Y,Z) ;

DCL (X,Y) FIXED BIN(3l),Z FIXED BIN (31);

Z=MOD((X+Y+FIXED((X-1)/4)-FIXED((X-l)/lO~)+FIXED((X-l)/4~~)),7);

RETURN;

END WEEK;

*PROCESS,A,X,AG,FLOW;

RANDM:PROCEDURE(DSEED,N,R);

DCL (N,I)FIXED BIN(3l),R FLOAT BIN(31);

DCL (DSEED,D2P31M,D2P31) FLOAT(16);

(NOFIXEDOVERFLOW): D2P31M=2147483647.; D2P31=2147483648.;

DSEED=MOD(16807.*DSEED,D2P31M); R=DSEED/D2P31; RETURN;

END RANDM;




The Forest Service, U.S. Department of Agriculture, is dedicated to the principie of multiple

use management of the Nation’s

forest resources for sustained

yields of wood, water, forage,

wildlife, and recreation. Through

forestry research, cooperation

with the States and private forest

owners, and management of the

National Forests and National

Grasslands, it strives-as directed by Congress-to provide

increasingly greater service to a

growing Nation.

USDA policy does not permit discrimination because of

race, color, national origin, sex or religion. Any person

who believes he or she has been discriminated against in

any USDA-related activity should write immediately to

the Secretary of Agriculture, Washington, D.C. 20250.