Function SET190B

LANSA

Function SET190B

********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_190);
********** COMMENT(Function .......: SET190B);
********** COMMENT(Created on .....: 20/11/00 at 14:53:52);
********** COMMENT(Description ....: Create data for example 190);
********** COMMENT(Version.........: 1);
********** COMMENT();
********** COMMENT(Full Description: The purpose of this function is to);
********** COMMENT(create a poll and respondent data.);
********** COMMENT();
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as);
********** COMMENT(sample material only. No warranty concerning the);
********** COMMENT(material or its use in any way whatsoever is);
********** COMMENT(expressed or implied.);
********** COMMENT();
********** COMMENT(Minimum Release of LANSA: 8.0);
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Function control options);
FUNCTION OPTIONS(*DIRECT);
********** COMMENT();
********** COMMENT(Group and field definitions);
********** COMMENT();
GROUP_BY NAME(#S_GRPPDF) FIELDS((#S_190PID)(#S_190PDS)(#S_190PPW)(#S_190PBN)(#S_190PST));
GROUP_BY NAME(#S_GRPPQU) FIELDS((#S_190PID)(#S_190PQN)(#S_190PQA)(#S_190PQL)(#S_190PQS)(#S_190PQSQ));
GROUP_BY NAME(#S_GRPPQS) FIELDS((#S_190PID)(#S_190PQN)(#S_190PSN)(#S_190PSA)(#S_190PSL));
GROUP_BY NAME(#S_GRPPRA) FIELDS((#S_190PID)(#S_190RID)(#S_190PQN)(#S_190PSN)(#S_190RV)(#S_190RANK));
GROUP_BY NAME(#S_GRPPRE) FIELDS((#S_190PID)(#S_190RID)(#S_190RNM)(#S_190RAG));
********** COMMENT();
DEFINE FIELD(#S_190RSPF) TYPE(*CHAR) LENGTH(001) LABEL('Response data?') DESC('Create responses & respondents Y/N');
DEFINE FIELD(#S_190SELF) TYPE(*CHAR) LENGTH(001) LABEL('Create poll') DESC('Create poll') COLHDG('Create' 'Poll');
DEFINE FIELD(#S_190BCNT) TYPE(*DEC) LENGTH(001) DECIMALS(0) DESC('Temporary poll identifier');
OVERRIDE FIELD(#S_190PDS) LENGTH(*SAME *MINUS 002) LABEL('Poll descriptn') DESC('Poll Description');
OVERRIDE FIELD(#S_190PBN) LENGTH(038);
********** COMMENT();
********** COMMENT(Mainline);
********** COMMENT();
DEF_COND NAME(*AS400) COND('*CPUTYPE = AS400');
IF COND(*AS400);
ELSE;
MESSAGE MSGTXT('Not available on PC');
RETURN;
ENDIF;
********** COMMENT();
********** COMMENT(Request web system variable values);
CALL PROCESS(*DIRECT) FUNCTION(SET190D) EXIT_USED(*NEXT) MENU_USED(*NEXT);
********** COMMENT();
DEF_LIST NAME(#S_190BLST) FIELDS((#S_190SELF)(#S_190PDS)(#S_190PPW)(#S_190PBN)(#S_190PST)(#S_190RSPF)(#S_190BCNT *HIDDEN));
CLR_LIST NAMED(#S_190BLST);
SET_MODE TO(*CHANGE);
CHANGE FIELD(#S_190SELF) TO(Y);
CHANGE FIELD(#S_190PDS) TO('''Getting to work''');
CHANGE FIELD(#S_190PST) TO(OPEN);
CHANGE FIELD(#S_190PPW) TO(NONE);
CHANGE FIELD(#S_190PBN) TO('S_190BANNER.GIF');
CHANGE FIELD(#S_190RSPF) TO(Y);
CHANGE FIELD(#S_190BCNT) TO(1);
ADD_ENTRY TO_LIST(#S_190BLST);
CHANGE FIELD(#S_190PDS) TO('''LANSA quiz''');
CHANGE FIELD(#S_190BCNT) TO(2);
ADD_ENTRY TO_LIST(#S_190BLST);
********** COMMENT();
BEGIN_LOOP;
REQUEST BROWSELIST(#S_190BLST);
********** COMMENT(Validate);
BEGINCHECK;
********** COMMENT(Change #S_190PID to a non-zero value, and do a dummy);
********** COMMENT(insert to catch any other validation check errors);
CHANGE FIELD(#S_190PID) TO(1);
********** COMMENT();
SELECTLIST NAMED(#S_190BLST);
IF COND('#S_190SELF *NE *BLANKS');
BEGINCHECK;
INSERT FIELDS(#S_GRPPDF) TO_FILE(SETPDF) VAL_ERROR(*NEXT) CHECK_ONLY(*YES);
VALUECHECK FIELD(#S_190RSPF) WITH_LIST(Y N ' ') MSGTXT('Must be Y(es) or N(o)');
UPD_ENTRY IN_LIST(#S_190BLST);
ENDCHECK IF_ERROR(*NEXT);
ENDIF;
ENDSELECT;
ENDCHECK;
********** COMMENT();
SELECTLIST NAMED(#S_190BLST);
IF COND('#S_190SELF *NE *BLANKS');
********** COMMENT(Auto-generate the next poll identifier);
CHANGE FIELD(#S_190PID) TO(*S_190PID);
CASE OF_FIELD(#S_190BCNT);
WHEN VALUE_IS('= 1');
EXECUTE SUBROUTINE(CRTALL1);
MESSAGE MSGTXT('Getting to work poll created');
WHEN VALUE_IS('= 2');
EXECUTE SUBROUTINE(CRTALL2);
MESSAGE MSGTXT('LANSA quiz poll created');
ENDCASE;
ENDIF;
ENDSELECT;
********** COMMENT();
END_LOOP;
********** COMMENT();
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Subroutine ....: CRTALL2);
********** COMMENT(Description ...: Create the LANSA quiz poll);
********** COMMENT(=======================================================);
********** COMMENT(=======================================================);
SUBROUTINE NAME(CRTALL2);
********** COMMENT(Create Poll Header);
EXECUTE SUBROUTINE(CRTPOLL) WITH_PARMS(#S_190PID #S_190PDS NONE 'S_190BANNER.Gif' #S_190PST);
********** COMMENT();
********** COMMENT(Create Questions for the poll);
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 1 10 'SELECT' 'Most recent record ' 'How do you get the most recent record for an' 'employee in a file keyed #EMPNO (Ascending) ' '#DATE (Ascending)?' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 2 20 'SELECT' 'Field names ' 'When designing a database, if the same field' 'appears in two files, which is correct?: ' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 3 30 'SELECT' 'Help text usage ' 'How often will the users of a package developed' 'in LANSA look at the field help text? ' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 4 40 'SELECT' 'Movie Personality ' 'Which movie personality would best personify' 'LANSA ' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 5 50 'SELECT' 'How many years LANSA' 'How many years of experience of LANSA' 'programming do you have? ' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 6 60 'SELECT' 'How many years progr' 'How many years of professional programming do' 'you have? (In any language)' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 7 5 'SELECT' 'What is an AS/400 ' 'What is an AS/400 to you? ' ' ' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 8 35 'RANK' 'Visual LANSA coding' 'Rank the following golden rules for coding in' 'Visual LANSA (for AS/400 programmers) (1 = most' 'important, 5 = least important, 0 = not' 'important at all) ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 9 45 'SELECT' 'Web passing a param' 'When passing a packed 6,2 field called S_190N as' 'a parameter to a LANSA for the web function,' 'where the passed field value is 12.5, which of' 'the following will not work correctly?:' ' ');
********** COMMENT();
********** COMMENT(Create possible selections for the questions);
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 1 'SEL *BACKWARDS ' 'SELECT *BACKWARDS, with key ' '#EMPNO, LEAVE, ENDSELECT ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 2 'FETCH *BACKWARDS ' 'FETCH *BACKWARDS with key #EMPNO' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 3 'create a new logical' 'create a new logical view keyed by #EMPNO (A) ' '#DATE (D) ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(2 1 'Use two fields ' 'You should use two fields, but ref ' 'them to a common field ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(2 2 'Use one field ' 'You should use one field for both ' 'files ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(2 3 'either is ok ' 'Either method is workable ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(3 1 'whenever required ' 'Whenever they require additional ' 'information ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(3 2 '1 year ' 'Once per user-year ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(3 3 '10 years ' 'Once every 10 user-years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 1 'Jennifer Lopez ' 'Jennifer Lopez ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 2 'Clint Eastwood ' 'Clint Eastwood ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 3 'Arnold Schwartzengge' 'Arnold Schwartzenegger ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 4 'Bruce Willis ' 'Bruce Willis ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 5 'Alicia Silverstone ' 'Alicia Silverstone in Clueless ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 6 'Danny DeVito ' 'Danny DeVito ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 7 'Kramer ' 'Kramer from Seinfeld ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(5 1 '0 - 1 year ' '0 to 1 year ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(5 2 '1 - 2 years ' '1 - 2 years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(5 3 '2 - 4 years ' '2 - 4 years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(5 4 '4 - 6 years ' '4 - 6 years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(5 5 'more than 6 years ' 'more than 6 years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(6 1 '0 - 1 year ' '0 to 1 year ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(6 2 '1 - 2 years ' '1 to 2 years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(6 3 '2 - 4 years ' '2 to 4 years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(6 4 '4 - 6 years ' '4 to 6 years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(6 5 '6 - 10 years ' '6 to 10 years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(6 6 '10 - 20 years ' '10 to 20 years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(6 7 'more than 20 years ' 'more than 20 years ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(7 1 'a reliable way ' 'A reliable way of getting things done ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(7 2 'a reliable fast ' 'A reliable fast way of getting things done ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(7 3 'my work environment ' 'the environment I must currently work in ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 1 'Encapsulate ' 'Encapsulate or perish ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 2 'Cascade ' 'Code for a cascade of events, ' 'not a sequential list. ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 3 '2000 lines too long ' 'A 2000 line program is too long ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 4 'Positioning in a lis' 'Learn the right way to programmatically ' 'position in a LTVW ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 5 'Indicate busy ' 'Remember to indicate to the user when ' 'the program is busy ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(9 1 '001250 ' '+FUNCPARMS+S_190N(P0062):001250 ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(9 2 '000000012.5 ' '+FUNCPARMS+S_190N(P0062):000000012.5 ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(9 3 '12.5 ' '+FUNCPARMS+S_190N(P0062):12.5 ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(9 4 '12.50000 ' '+FUNCPARMS+S_190N(P0062):12.50000 ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(9 5 'dont know ' 'dont know ' ' ');
********** COMMENT();
********** COMMENT();
********** COMMENT(If the user chose to create respondents and responses);
********** COMMENT(for this poll);
********** COMMENT();
IF COND('#S_190RSPF *EQ Y');
********** COMMENT();
********** COMMENT(Create Respondents and store the identifiers assigned);
********** COMMENT(to each, in a list);
CLR_LIST NAMED(#S_LSTPRE);
********** COMMENT();
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('BS ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('KM ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('SH ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('DF ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('BM ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('RH ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('TF ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('MK ' 0);
********** COMMENT();
********** COMMENT(Create responses);
********** COMMENT(R1);
********** COMMENT(Get respondent id for the first respondent);
GET_ENTRY NUMBER(1) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 2 ' ' 0);
********** COMMENT(R2);
GET_ENTRY NUMBER(2) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 4 ' ' 0);
********** COMMENT(R3);
********** COMMENT();
GET_ENTRY NUMBER(3) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 5 ' ' 0);
********** COMMENT(R4);
********** COMMENT();
GET_ENTRY NUMBER(4) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 5 ' ' 0);
********** COMMENT(R5);
********** COMMENT();
GET_ENTRY NUMBER(5) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 2 ' ' 0);
********** COMMENT(R6);
********** COMMENT();
GET_ENTRY NUMBER(6) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 7 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 ' ' 0);
********** COMMENT(R7);
********** COMMENT();
GET_ENTRY NUMBER(7) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 6 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 2 ' ' 0);
********** COMMENT(R8);
********** COMMENT();
GET_ENTRY NUMBER(8) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 ' ' 0);
ENDIF;
ENDROUTINE;
********** COMMENT();
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Subroutine ....: CRTALL1);
********** COMMENT(Description ...: Create getting to work poll);
********** COMMENT(=======================================================);
********** COMMENT(=======================================================);
SUBROUTINE NAME(CRTALL1);
********** COMMENT(Create Poll Header);
EXECUTE SUBROUTINE(CRTPOLL) WITH_PARMS(#S_190PID #S_190PDS NONE 'S_190BANNER.Gif' #S_190PST);
********** COMMENT();
********** COMMENT(Create Questions for the poll);
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 1 10 SELECT 'How you get to work' 'How do you get to work? (The primary method -' 'the method that covers the greatest distance)' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 2 20 SELECT 'How long to work ' 'How long would it take you to get to work on an' 'average day? (Door to door)' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 3 30 SELECT 'How long from work ' 'How long does it take you to get home from work,' 'on an average day? (Door to door)' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 4 40 SELECT 'How long waiting ' 'What is the total time spent waiting, during ' 'an average days travel to and from work?' '(Waiting to catch or connect with a bus or' 'train, or waiting in traffic.)' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 5 50 YESNO 'Is time a problem ' 'Do you consider that the time you spend ' 'travelling is a problem?' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 6 60 SELECT 'Work during travel ' 'How much work (or preparation for work) do you' 'get done while travelling?' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 7 70 SELECT 'Record with ' 'What would you use to record thoughts that you' 'have about work, while travelling? ' ' ' ' ' ' ');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 8 80 RANK 'Rank feasibility ' 'Rank the following methods of travel in terms of' 'how feasible they would be as the primary method' ' of getting you to and from work. (1 = most' 'feasible, 8 = least feasible, 0 = not)' 'feasible at all');
EXECUTE SUBROUTINE(CRTQUES) WITH_PARMS(#S_190PID 9 90 ANSWER 'What improvements ' 'What improvements do you think would help' 'the most?' ' ' ' ' ' ');
********** COMMENT();
********** COMMENT(Create possible selections for the questions);
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 1 'Car ' 'Car ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 2 'Bus ' 'Bus ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 3 'Train ' 'Train ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 4 'Bicycle ' 'Bicycle ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 5 'Walk ' 'Walk ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 6 'Taxi ' 'Taxi ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 7 'Ferry ' 'Ferry ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 8 'Fly ' 'Fly ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(1 9 'Other ' 'Other ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(2 1 '0 - 10 min ' '0 - 10 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(2 2 '11 - 40 min ' '11 - 40min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(2 3 '41 - 60 min ' '41 - 60 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(2 4 '61 - 80 min ' '61 - 80 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(2 5 '81 - 120 min ' '81 - 120 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(2 6 'more than 2 hrs ' 'more than 2 hrs ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(3 1 '0 - 10 min ' '0 -10 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(3 2 '11 - 40 min ' '11 - 40 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(3 3 '41 - 60 min ' '41 - 60 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(3 4 '61 - 80 min ' '61 - 80 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(3 5 '80 - 120 min ' '80 - 120 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(3 6 'more than 2 hrs ' 'more than 2 hours ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 1 '0 - 5 min ' '0 - 5 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 2 '6 - 10 min ' '6 - 10 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 3 '11 - 20 min ' '11 - 20 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 4 '21 - 40 min ' '21 - 40 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(4 5 'more than 40 min ' 'more than 40 min ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(5 1 'Yes ' 'Yes ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(5 2 'No ' 'No ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(6 1 'insignificant ' 'none or an insignificant amount ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(6 2 'significant but not ' 'significant, but not much compared ' 'to the same time at work ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(6 3 'comparable ' 'comparable with the same time spent at work' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(7 1 'Memory only ' 'I remember them ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(7 2 'palm pilot ' 'palm pilot or similar ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(7 3 'notebook computer ' 'notebook/laptop computer ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(7 4 'paper ' 'paper ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(7 5 'other ' 'other ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 1 'Car ' 'Car ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 2 'Bus ' 'Bus ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 3 'Train ' 'Train ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 4 'Bicycle ' 'Bicycle ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 5 'Walk ' 'Walk ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 6 'Taxi ' 'Taxi ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 7 'Ferry ' 'Ferry ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(8 8 'Fly ' 'Fly ' ' ');
EXECUTE SUBROUTINE(CRTSEL) WITH_PARMS(9 1 'Free Format ' 'Free Format ' ' ');
********** COMMENT();
********** COMMENT(If the user chose to create respondents and responses);
********** COMMENT(for this poll);
********** COMMENT();
IF COND('#S_190RSPF *EQ Y');
********** COMMENT();
********** COMMENT(Create Respondents and store the identifiers assigned);
********** COMMENT(to each, in a list);
DEF_LIST NAME(#S_LSTPRE) FIELDS(#S_190RID) TYPE(*WORKING);
CLR_LIST NAMED(#S_LSTPRE);
********** COMMENT();
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Crows Nest to North Sydney ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Clovelly to North Sydney ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Cremorne to North Sydney ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Randwick to North Sydney ' 1);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Bondi Beach to North Sydney ' 2);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Bondi Junction to North Sydney ' 3);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Erskineville to North Sydney ' 4);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Bankstown to North Sydney ' 5);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Neutral Bay to North Sydney ' 6);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Penrith to North Sydney ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Gosford to North Sydney 1 ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Gosford to North Sydney 2 ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Milsons Point to North Sydney ' 0);
EXECUTE SUBROUTINE(CRTRPNDT) WITH_PARMS('Terry Hills to North Sydney ' 0);
********** COMMENT();
********** COMMENT();
********** COMMENT(Create responses);
********** COMMENT(Get respondent id for the first respondent);
GET_ENTRY NUMBER(1) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 6 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 6 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'More taxis ' 0);
********** COMMENT(Get respondent id for the second respondent);
GET_ENTRY NUMBER(2) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 6 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'More freq buses, more bus lane' 0);
********** COMMENT(Get respondent id for the third respondent);
GET_ENTRY NUMBER(3) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 6 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'Extended bike lanes ' 0);
********** COMMENT(Get respondent id for the fourth respondent);
GET_ENTRY NUMBER(4) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 6 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'Extend bus lanes ' 0);
********** COMMENT(Get respondent id for the fifth respondent);
GET_ENTRY NUMBER(5) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 6 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'More frequent buses ' 0);
********** COMMENT(Get respondent id for the sixth respondent);
GET_ENTRY NUMBER(6) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 6 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'More trains 6:00pm to 8pm ' 0);
********** COMMENT(Get respondent id for the seventh respondent);
GET_ENTRY NUMBER(7) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 6 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'More trains 6:00 - 8pm ' 0);
********** COMMENT(Get respondent id for the eighth respondent);
GET_ENTRY NUMBER(8) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'More trains ' 0);
********** COMMENT(Get respondent id for the nineth respondent);
GET_ENTRY NUMBER(9) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 5);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 6 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 ' ' 0);
********** COMMENT(Get respondent id for the tenth respondent);
GET_ENTRY NUMBER(10) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'More trains 6:30 - 7pm ' 0);
********** COMMENT(Get respondent id for the eleventh respondent);
GET_ENTRY NUMBER(11) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'Raise the speed limit to 160 ' 0);
********** COMMENT(Get respondent id for the twelveth respondent);
GET_ENTRY NUMBER(12) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 3 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'More frequent trains ' 0);
********** COMMENT(Get respondent id for the thirteenth respondent);
GET_ENTRY NUMBER(13) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 5 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 2 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 4);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 4 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 5 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 6 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 ' ' 0);
********** COMMENT(Get respondent id for the fourteenth respondent);
GET_ENTRY NUMBER(14) FROM_LIST(#S_LSTPRE);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(1 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(2 4 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(3 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(4 3 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(5 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(6 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(7 1 ' ' 0);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 1 ' ' 1);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 2 ' ' 2);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(8 6 ' ' 3);
EXECUTE SUBROUTINE(CRTRESP) WITH_PARMS(9 1 'More lanes on the spit bridge ' 0);
********** COMMENT();
********** COMMENT();
ENDIF;
ENDROUTINE;
********** COMMENT(=======================================================);
********** COMMENT(Subroutine ....: CRTRESP);
********** COMMENT(Description ...: Create SETPRA record);
********** COMMENT(=======================================================);
SUBROUTINE NAME(CRTRESP) PARMS((#S_190PQN) (#S_190PSN) (#S_190RV) (#S_190RANK));
********** COMMENT(*** NOTE *** #S_190PID is also used);
********** COMMENT(*** NOTE *** #S_190RID is also used);
********** COMMENT();
CHECK_FOR IN_FILE(SETPRA) WITH_KEY(#S_190PID #S_190RID #S_190PQN #S_190PSN);
IF_STATUS IS(*EQUALKEY);
UPDATE FIELDS(#S_GRPPRA) IN_FILE(SETPRA) WITH_KEY(#S_190PID #S_190RID #S_190PQN #S_190PSN);
ELSE;
INSERT FIELDS(#S_GRPPRA) TO_FILE(SETPRA);
ENDIF;
ENDROUTINE;
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Subroutine ....: CRTRPNDT);
********** COMMENT(Description ...: Create SETPRE record);
********** COMMENT(=======================================================);
SUBROUTINE NAME(CRTRPNDT) PARMS((#S_190RNM) (#S_190RAG));
********** COMMENT(*** NOTE *** #S_190PID is also used);
********** COMMENT(*** NOTE *** #S_190RID is generated and stored in list);
********** COMMENT(#S_LSTPRE.);
********** COMMENT();
CHANGE FIELD(#S_190RID) TO(*AUTONUM15S_190RID);
********** COMMENT();
CHECK_FOR IN_FILE(SETPRE) WITH_KEY(#S_190PID #S_190RID);
IF_STATUS IS(*EQUALKEY);
UPDATE FIELDS(#S_GRPPRE) IN_FILE(SETPRE) WITH_KEY(#S_190PID #S_190RID);
ELSE;
INSERT FIELDS(#S_GRPPRE) TO_FILE(SETPRE);
ENDIF;
ADD_ENTRY TO_LIST(#S_LSTPRE);
ENDROUTINE;
********** COMMENT(=======================================================);
********** COMMENT(Subroutine ....: CRTSEL);
********** COMMENT(Description ...: Create SETPQS record);
********** COMMENT(=======================================================);
SUBROUTINE NAME(CRTSEL) PARMS((#S_190PQN) (#S_190PSN) (#S_190PSA) (#S_190PSL1) (#S_190PSL2));
********** COMMENT(*** NOTE *** #S_190PID is also used);
DEFINE FIELD(#S_190PSL1) REFFLD(#S_190PSL);
DEFINE FIELD(#S_190PSL2) REFFLD(#S_190PSL);
********** COMMENT();
USE BUILTIN(BCONCAT) WITH_ARGS(#S_190PSL1 #S_190PSL2) TO_GET(#S_190PSL);
********** COMMENT();
CHECK_FOR IN_FILE(SETPQS) WITH_KEY(#S_190PID #S_190PQN #S_190PSN);
IF_STATUS IS(*EQUALKEY);
UPDATE FIELDS(#S_GRPPQS) IN_FILE(SETPQS) WITH_KEY(#S_190PID #S_190PQN #S_190PSN);
ELSE;
INSERT FIELDS(#S_GRPPQS) TO_FILE(SETPQS);
ENDIF;
ENDROUTINE;
********** COMMENT(=======================================================);
********** COMMENT(Subroutine ....: CRTQUES);
********** COMMENT(Description ...: Create SETPQU record);
********** COMMENT(=======================================================);
SUBROUTINE NAME(CRTQUES) PARMS((#S_190PID) (#S_190PQN) (#S_190PQSQ) (#S_190PQS) (#S_190PQA) (#S_190PQL1) (#S_190PQL2) (#S_190PQL3) (#S_190PQL4) (#S_190PQL5));
DEFINE FIELD(#S_190PQL1) REFFLD(#S_190PQL);
DEFINE FIELD(#S_190PQL2) REFFLD(#S_190PQL);
DEFINE FIELD(#S_190PQL3) REFFLD(#S_190PQL);
DEFINE FIELD(#S_190PQL4) REFFLD(#S_190PQL);
DEFINE FIELD(#S_190PQL5) REFFLD(#S_190PQL);
********** COMMENT();
USE BUILTIN(BCONCAT) WITH_ARGS(#S_190PQL1 #S_190PQL2 #S_190PQL3 #S_190PQL4 #S_190PQL5) TO_GET(#S_190PQL);
CHECK_FOR IN_FILE(SETPQU) WITH_KEY(#S_190PID #S_190PQN);
IF_STATUS IS(*EQUALKEY);
UPDATE FIELDS(#S_GRPPQU) IN_FILE(SETPQU) WITH_KEY(#S_190PID #S_190PQN);
ELSE;
INSERT FIELDS(#S_GRPPQU) TO_FILE(SETPQU);
ENDIF;
ENDROUTINE;
********** COMMENT();
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Subroutine ....: CRTPOLL);
********** COMMENT(Description ...: Create SETPDF record);
********** COMMENT(=======================================================);
SUBROUTINE NAME(CRTPOLL) PARMS((#S_190PID) (#S_190PDS) (#S_190PPW) (#S_190PBN) (#S_190PST));
CHECK_FOR IN_FILE(SETPDF) WITH_KEY(#S_190PID);
IF_STATUS IS(*EQUALKEY);
UPDATE FIELDS(#S_GRPPDF) IN_FILE(SETPDF) WITH_KEY(#S_190PID);
ELSE;
INSERT FIELDS(#S_GRPPDF) TO_FILE(SETPDF);
ENDIF;
ENDROUTINE;