Z:\to_server\website\mrdcl-learning.com\mrdcl_files\INT-06\getstarted5.stp
start data,
serial number in columns 1-4,
card characters 1000,
!
!This .stp is designed to help you when things go wrong!!!
!It has two deliberate errors in the code. First of all, $q1 has had the No label removed and secondly table 1
!has a variable that is called $qq1 rather than $q1.
!
!If you try to run this .stp you will get errors in compilation that will stop you proceeding any further.
!To fix these you will usually edit or view the listing file. You will see that errors are placed at the point
!where MRDCL cannot compile your code. An error message which begins with >>F marks the error. If you locate
!>>F in a big .stp file you will find the errors. Correct the errors and it should be fine!
!Try it now!
!
!
ds $q1=$5/1,2,e,
v='Yes;
No;
Not stated<z>',
h='Ever used MRDCL\
Yes;
No;
NS<s>',
xt='Q1 Have you used MRDCL before?',
!
dm $q2=$6-8,e,
x='Ate at a restaurant;
Went to see a film;
Went to watch a sporting event;
None/NS',
xt='Q2 Activities in the past month',
!
f=ifbu,
!
di $iq3=$9-10,
xt='Q3 Number of children in family',
!
ds $q3=$iq3/0,1,2,3,>3,e,
x='No children;
1 child;
2 children;
3 children;
More than 3 children;
Not stated<z>',
xt='Q3 Number of children in family',
!
ds $q4=$12/1-5,e,
x='Very good (5)<v5>;
Quite good (4)<v4>;
Average (3)<v3>;
Quite poor (2)<v2>;
Very poor (1)<v1>;
Not stated<z>',
xt='Q4 Rating of postal service',
!
dm $mybanner=$q1,$q2/1-3,$q4/1..2,3,4..5,
h=$q1 +
'Activities in past month\
Rest- au- rant;
Saw film;
Spor*ting event;
Postal service\
Good;
Aver- age;
Poor',
!
finish data,
start tables,
!
%jh='<jc>My project',
%jf='Prepared by a really good MRDCL specwriter on <&dd> <&month> <&year><jc>',
!This is a global footnote. Note it uses <&dd> to get the day of the month that the run was executed, as well as
!the month and year. Other similar specials allow you to show other date/time options
global bt#='All respondents',
f=sdv/spl180/uch/caz'0',
!
select banner $mybanner,
!
t#1=$q1 * $q2,
!
t#2=$q3 * $q1,
+t#2x=@ $iq3 * $q1,
!
if $q1/1,t#3=$q3 * $q2,
bt='All who have used MRDCL before',
if $q1/1,+t#3x= @ $q3 * $q2,
!
t#4(f=evr/ser)=$q4 * $q1,
!
t#5=$q1 *,
!
t#6=$q2 *,
!
t#7=$q4 *,
!
finish tables,
