1.00 
       *********************************************************************
2.00 
       *  RPG ILE MODULE JS2/GETACAR
3.00 
       *
4.00 
       *  After compiling this RPG MODULE,
5.00 
       *  create the related program with the following command:
6.00 
       *
7.00 
       *  CRTPGM JS2/GETACAR MODULE(JS2/GETACAR)
8.00 
       *         ACTGRP(CGI) AUT(*USE)
9.00 
       *
10.00 
       *  To execute this program,
11.00 
       *  enter the following in your Internet browser command line:
12.00 
       *    http://.../js2p/getacar.pgm
13.00 
       *
14.00 
       *********************************************************************
15.00 
       /copy JS2/qrpglesrc,hspecs
16.00 
       /copy JS2/qrpglesrc,hspecsbnd
17.00 
       * Countries
18.00 
      FCOUNTRIES IF   e           K DISK    USROPN
19.00 
       * Car makes, by name
20.00 
      FCARMKR01  IF   e           K DISK    USROPN
21.00 
      F                                     RENAME(carmkrrcd:carmkrrcd1)
22.00 
       * Car makes, by number
23.00 
      FCARMKR    IF   e           K DISK    USROPN
24.00 
       * Car models, by make number and model number
25.00 
      FCARMDL    IF   e           K DISK    USROPN
26.00 
       *=====================================================================
27.00 
       * Includes to be used in CGIs
28.00 
       *=====================================================================
29.00 
       /copy JS2/qrpglesrc,prototypeb
30.00 
       /copy JS2/qrpglesrc,usec
31.00 
       /copy JS2/qrpglesrc,variables3
32.00 
       *--------------------------------------------------------------------
33.00 
       *  Other program variables and constants
34.00 
       *--------------------------------------------------------------------
35.00 
      D Action          s             10a                                        variable names
36.00 
      D SubAction       s             10a                                        variable names
37.00 
      D CgiInp01        s              7a                                        variable names
38.00 
      D CgiInp02        s              7a                                        variable names
39.00 
      D CgiInp03        s              6a                                        variable names
40.00 
      D CgiInp04        s             10a                                        variable names
41.00 
      D CgiInp05        s             10a                                        variable names
42.00 
      D CgiInp06        s             10a                                        variable names
43.00 
      D CgiInp07        s             10a                                        variable names
44.00 
      D CgiInp50        s            100a                                        variable names
45.00 
       *
46.00 
      D InitSW          s              1a                                        variable names
47.00 
       *
48.00 
      D Lib             s             10a                                        variable names
49.00 
      D Fn              s             10a                                        variable names
50.00 
      D Mbr             s             10a                                        variable names
51.00 
       *
52.00 
      D char500         s            500a                                        variable names
53.00 
       *
54.00 
      DColor01          S             10A
55.00 
      DColor02          S             10A
56.00 
      DColor03          S             10A
57.00 
      DColor04          S             10A
58.00 
      DColor05          S             10A
59.00 
      DColor06          S             10A
60.00 
      DColor07          S             10A
61.00 
      DColor08          S             10A
62.00 
      DColor09          S             10A
63.00 
      DColor10          S             10A
64.00 
       *
65.00 
      DErrorSW          S              1A
66.00 
      DRed              S             10A   inz('red')
67.00 
       *
68.00 
      DBold             S              3A   inz('<b>')
69.00 
      DBoldEnd          S              4A   inz('</b>')
70.00 
       *=====================================================================
71.00 
       * Read remote browser request and map to program fields
72.00 
       *=====================================================================
73.00 
       /copy JS2/qrpglesrc,prolog3
74.00 
      C                   eval      Action     = zhbgetvar('action'        )
75.00 
      C                   eval      SubAction  = zhbgetvar('subaction'     )
76.00 
      C                   eval      CgiInp01   = zhbgetvar('cgiinp01'      )
77.00 
      C                   eval      CgiInp02   = zhbgetvar('cgiinp02'      )
78.00 
      C                   eval      CgiInp03   = zhbgetvar('cgiinp03'      )
79.00 
      C                   eval      CgiInp04   = zhbgetvar('cgiinp04'      )
80.00 
      C                   eval      CgiInp05   = zhbgetvar('cgiinp05'      )
81.00 
      C                   eval      CgiInp06   = zhbgetvar('cgiinp06'      )
82.00 
      C                   eval      CgiInp07   = zhbgetvar('cgiinp07'      )
83.00 
      C                   eval      CgiInp50   = zhbgetvar('cgiinp50'      )
84.00 
       *=====================================================================
85.00 
       * Main line
86.00 
       *=====================================================================
87.00 
       * Check the action requested
88.00 
      C     lw:up         xlate     Action        Action
89.00 
      C     lw:up         xlate     SubAction     SubAction
90.00 
       * Ask the service program to load into core
91.00 
       * the appropriate output skeleton html member
92.00 
      C                   exsr      LoadHtml
93.00 
       * Initialize fields
94.00 
      C                   exsr      Init
95.00 
       *------------------
96.00 
       * Override database files
97.00 
      C                   exsr      OvrDbf
98.00 
       * Start response HTML
99.00 
      C                   exsr      SetTop
100.00 
      C                   callp     wrtsection('top')
101.00 
      C                   if        subaction = ' '
102.00 
      C                   callp     wrtsection('title1')
103.00 
      C                   endif
104.00 
      C                   if        subaction = 'GET1'
105.00 
      C                   callp     wrtsection('title2')
106.00 
      C                   endif
107.00 
       * Buttons to display HTML and RPG source?
108.00 
      C     SubAction     ifne      'GET1'
109.00 
      C     Action        orlt      'C'
110.00 
      C                   callp     wrtsection('doc')
111.00 
      C                   endif
112.00 
      C                   callp     wrtsection('docend')
113.00 
       *------------------
114.00 
       * Perform logic requested from HTML input field "SubAction"
115.00 
       * 1-User did not enter any data yet
116.00 
      C     SubAction     ifeq      *blanks
117.00 
      C                   exsr      AskDta
118.00 
      C                   exsr      Exit
119.00 
      C                   endif
120.00 
       * 2-User submitted the first part of the questionnaire
121.00 
      C     SubAction     ifeq      'GET1'
122.00 
      C                   exsr      GetGet1
123.00 
      C                   exsr      Exit
124.00 
      C                   endif
125.00 
       * 3-User submitted the second part of the questionnaire
126.00 
      C     SubAction     ifeq      'GET2'
127.00 
      C                   exsr      GetGet2
128.00 
      C                   exsr      Exit
129.00 
      C                   endif
130.00 
       *------------------
131.00 
       * Flush the response html buffer and exit
132.00 
      C                   exsr      Exit
133.00 
       *=====================================================================
134.00 
       * Initialize fields
135.00 
       *=====================================================================
136.00 
      C     Init          begsr
137.00 
      C                   eval      color01 = 'black'
138.00 
      C                   eval      color02 = 'black'
139.00 
      C                   eval      color03 = 'black'
140.00 
      C                   eval      color04 = 'black'
141.00 
      C                   eval      color05 = 'black'
142.00 
      C                   eval      color06 = 'black'
143.00 
      C                   eval      color07 = 'black'
144.00 
      C                   eval      color08 = 'black'
145.00 
      C                   eval      color09 = 'black'
146.00 
      C                   eval      color10 = 'black'
147.00 
      C                   endsr
148.00 
       *=====================================================================
149.00 
       * Ask input data
150.00 
       *=====================================================================
151.00 
      C     Askdta        begsr
152.00 
      C                   exsr      SetForm1
153.00 
      C                   callp     wrtsection('form1')
154.00 
       *------------------
155.00 
       * Provide list of countries to select from
156.00 
      C                   eval      ctrnam = *loval
157.00 
      C     ctrnam        setll     ctrrec
158.00 
       *
159.00 
      C                   do        *hival
160.00 
      C                   read      ctrrec                                 40
161.00 
      C     *in40         ifeq      '1'
162.00 
      C                   leave
163.00 
      C                   endif
164.00 
      C                   exsr      SetCtrRow
165.00 
      C                   callp     wrtsection('ctrrow')
166.00 
      C                   enddo
167.00 
       *
168.00 
      C                   exsr      SetCtrEnd
169.00 
      C                   callp     wrtsection('ctrend')
170.00 
       *------------------
171.00 
       * Provide list of car makers to select from
172.00 
      C                   eval      carmkrnam = *loval
173.00 
      C     carmkrnam     setll     carmkrrcd1
174.00 
       *
175.00 
      C                   do        *hival
176.00 
      C                   read      carmkrrcd1                             40
177.00 
      C     *in40         ifeq      '1'
178.00 
      C                   leave
179.00 
      C                   endif
180.00 
      C                   exsr      SetMkrRow
181.00 
      C                   callp     wrtsection('mkrrow')
182.00 
      C                   enddo
183.00 
       *
184.00 
      C                   callp     wrtsection('mkrend')
185.00 
       *
186.00 
      C                   endsr
187.00 
       *=====================================================================
188.00 
       * User submitted the first part of the questionnaire
189.00 
       *=====================================================================
190.00 
      C     GetGet1       begsr
191.00 
       *------------------
192.00 
       * Check input data
193.00 
      C                   exsr      ChkInpDta
194.00 
      C     ErrorSW       ifne      *blank
195.00 
      C                   callp     wrtsection('formerr')
196.00 
      C                   exsr      AskDta
197.00 
      C                   exsr      Exit
198.00 
      C                   endif
199.00 
       *------------------
200.00 
       * Provide second input form
201.00 
      C                   exsr      SetForm2
202.00 
      C                   callp     wrtsection('form2')
203.00 
       *
204.00 
      C     cgiinp04      ifeq      '1'
205.00 
      C                   callp     wrtsection('form2ky')
206.00 
      C                   else
207.00 
      C                   callp     wrtsection('form2kn')
208.00 
      C                   endif
209.00 
       * Get car make name
210.00 
      C                   exsr      GetMkrNam
211.00 
       *
212.00 
      C                   exsr      SetForm2k
213.00 
      C                   callp     wrtsection('form2kyn')
214.00 
       * Provide list of car models to select from
215.00 
      C     carmkrnbr     setll     carmdlrcd
216.00 
       *
217.00 
      C                   do        *hival
218.00 
      C     carmkrnbr     reade     carmdlrcd                              40
219.00 
      C     *in40         ifeq      '1'
220.00 
      C                   leave
221.00 
      C                   endif
222.00 
      C                   exsr      SetMdlRow
223.00 
      C                   callp     wrtsection('mdlrow')
224.00 
      C                   enddo
225.00 
       *
226.00 
      C                   callp     wrtsection('mdlend')
227.00 
       *
228.00 
      C                   endsr
229.00 
       *=====================================================================
230.00 
       * User submitted the second part of the questionnaire
231.00 
       *=====================================================================
232.00 
      C     GetGet2       begsr
233.00 
       *------------------
234.00 
       * Check input data
235.00 
      C                   exsr      ChkInpDta
236.00 
      C     ErrorSW       ifne      *blank
237.00 
      C                   eval      ErrorSw = *blank
238.00 
      C                   eval      SubAction = 'GET1'
239.00 
      C                   exsr      GetGet1
240.00 
      C                   exsr      Exit
241.00 
      C                   endif
242.00 
       *------------------
243.00 
       * Get car make name
244.00 
      C                   exsr      GetMkrNam
245.00 
       * Get car model name
246.00 
      C                   exsr      GetMdlNam
247.00 
       *------------------
248.00 
       * Provide final greetings
249.00 
      C                   exsr      SetFin
250.00 
      C                   callp     wrtsection('fin')
251.00 
      C     cgiinp04      ifne      *blank
252.00 
      C                   callp     wrtsection('finky')
253.00 
      C                   else
254.00 
      C                   callp     wrtsection('finkn')
255.00 
      C                   endif
256.00 
      C                   callp     wrtsection('finkyn')
257.00 
       *------------------
258.00 
       *
259.00 
      C                   endsr
260.00 
       *=====================================================================
261.00 
       * Check input data
262.00 
       *=====================================================================
263.00 
      C     ChkInpDta     begsr
264.00 
      C                   eval      ErrorSW = *blank
265.00 
       * User submitted the first part
266.00 
       * or the second part of the questionnaire
267.00 
      C     SubAction     IFEQ      'GET1'
268.00 
      C     SubAction     OREQ      'GET2'
269.00 
      C     cgiinp01      ifeq      *blank
270.00 
      C                   eval      color01 = Red
271.00 
      C                   eval      ErrorSW = 'X'
272.00 
      C                   endif
273.00 
      C     cgiinp02      ifeq      *blank
274.00 
      C                   eval      color02 = Red
275.00 
      C                   eval      ErrorSW = 'X'
276.00 
      C                   endif
277.00 
      C     cgiinp03      ifeq      *blank
278.00 
      C                   eval      color03 = Red
279.00 
      C                   eval      ErrorSW = 'X'
280.00 
      C                   endif
281.00 
      C     cgiinp05      ifeq      *blank
282.00 
      C                   eval      color05 = Red
283.00 
      C                   eval      ErrorSW = 'X'
284.00 
      C                   endif
285.00 
      C     cgiinp06      ifeq      *blank
286.00 
      C                   eval      color06 = Red
287.00 
      C                   eval      ErrorSW = 'X'
288.00 
      C                   endif
289.00 
      C                   ENDIF
290.00 
       * User submitted the first part of the questionnaire
291.00 
      C     SubAction     IFEQ      'GET2'
292.00 
      C     cgiinp07      ifeq      *blank
293.00 
      C                   eval      color07 = Red
294.00 
      C                   eval      ErrorSW = 'X'
295.00 
      C                   endif
296.00 
      C                   ENDIF
297.00 
       *
298.00 
      C                   endsr
299.00 
       *=====================================================================
300.00 
       * Get car make name
301.00 
       *=====================================================================
302.00 
      C     GetMkrNam     begsr
303.00 
      C                   movel     cgiinp06      carmkrnbr
304.00 
      C     carmkrnbr     chain     carmkrrcd                          60
305.00 
      C                   endsr
306.00 
       *=====================================================================
307.00 
       * Get car model name
308.00 
       *=====================================================================
309.00 
      C     GetMdlNam     begsr
310.00 
      C     carmdlkey     klist
311.00 
      C                   kfld                    carmkrnbr
312.00 
      C                   kfld                    carmdlnbr
313.00 
      C                   movel     cgiinp06      carmkrnbr
314.00 
      C                   movel     cgiinp07      carmdlnbr
315.00 
      C     carmdlkey     chain     carmdlrcd                          60
316.00 
      C                   endsr
317.00 
       *=====================================================================
318.00 
       * Set variables for section "top"
319.00 
       *=====================================================================
320.00 
      C     SetTop        begsr
321.00 
       * Name of the mother_window input hidden field
322.00 
       * where the selected model should be transmitted
323.00 
      C     cgiinp50      ifne      *blanks
324.00 
      C                   callp     updHtmlVar('RETURNMDL':cgiinp50)
325.00 
      C                   else
326.00 
      C                   callp     updHtmlVar('RETURNMDL':'unnamed')
327.00 
      C                   endif
328.00 
       *
329.00 
      C                   endsr
330.00 
       *=====================================================================
331.00 
       * Set variables for section "form1"
332.00 
       *=====================================================================
333.00 
      C     SetForm1      begsr
334.00 
       * Suffix for HTML member name
335.00 
      C                   callp     updHtmlVar('ACTION':Action)
336.00 
       * Timestamp to make page unique in the client navigator cache
337.00 
      C                   time                    TimeNow           6 0
338.00 
      C                   movel(p)  TimeNow       char500
339.00 
      C                   callp     updHtmlVar('TIMENOW':char500)
340.00 
       *------------------
341.00 
       * Colors of the headers
342.00 
      C                   callp     updHtmlVar('COLOR01':color01)
343.00 
      C                   callp     updHtmlVar('COLOR02':color02)
344.00 
      C                   callp     updHtmlVar('COLOR03':color03)
345.00 
      C                   callp     updHtmlVar('COLOR04':color04)
346.00 
      C                   callp     updHtmlVar('COLOR05':color05)
347.00 
       *------------------
348.00 
       * Mr./Mrs./Miss
349.00 
      C                   callp     updHtmlVar('RADIO01' + %trimr(cgiinp01):
350.00 
      C                             'checked')
351.00 
       * First name
352.00 
      C                   callp     updHtmlVar('CGIINP02':cgiinp02)
353.00 
       * Last name
354.00 
      C                   callp     updHtmlVar('CGIINP03':cgiinp03)
355.00 
       * Any kids?
356.00 
      C     cgiinp04      ifeq      '1'
357.00 
      C                   callp     updHtmlVar('CHECKED04':'checked')
358.00 
      C                   else
359.00 
      C                   callp     updHtmlVar('CHECKED04':' ')
360.00 
      C                   endif
361.00 
       *
362.00 
      C                   endsr
363.00 
       *=====================================================================
364.00 
       * Set variables for section "ctrrow"
365.00 
       *=====================================================================
366.00 
      C     SetCtrRow     begsr
367.00 
       * Country name
368.00 
      C                   callp     updHtmlVar('CTRNAM':ctrnam)
369.00 
       * Selected?
370.00 
      C     ctrnam        ifeq      cgiinp05
371.00 
      C                   callp     updHtmlVar('CTRSEL':'selected')
372.00 
      C                   else
373.00 
      C                   callp     updHtmlVar('CTRSEL':' ')
374.00 
      C                   endif
375.00 
       *
376.00 
      C                   endsr
377.00 
       *=====================================================================
378.00 
       * Set variables for section "ctrend"
379.00 
       *=====================================================================
380.00 
      C     SetCtrEnd     begsr
381.00 
      C                   callp     updHtmlVar('COLOR06':color06)
382.00 
       *
383.00 
      C                   endsr
384.00 
       *=====================================================================
385.00 
       * Set variables for section "mkrrow"
386.00 
       *=====================================================================
387.00 
      C     SetMkrRow     begsr
388.00 
       * Car maker name
389.00 
      C                   callp     updHtmlVar('CARMKRNAM':carmkrnam)
390.00 
       * Car maker number
391.00 
      C                   movel(p)  carmkrnbr     char500
392.00 
      C                   callp     updHtmlVar('CARMKRNBR':char500)
393.00 
       * Selected?
394.00 
      C                   move      carmkrnbr     carmkrnbrC        3
395.00 
      C     carmkrnbrC    ifeq      cgiinp06
396.00 
      C                   callp     updHtmlVar('CARSEL':'selected')
397.00 
      C                   else
398.00 
      C                   callp     updHtmlVar('CARSEL':' ')
399.00 
      C                   endif
400.00 
       *
401.00 
      C                   endsr
402.00 
       *=====================================================================
403.00 
       * Set variables for section "form2"
404.00 
       *=====================================================================
405.00 
      C     SetForm2      begsr
406.00 
       * Suffix for HTML member name
407.00 
      C                   callp     updHtmlVar('ACTION':Action)
408.00 
       * Timestamp to make page unique in the client navigator cache
409.00 
      C                   time                    TimeNow           6 0
410.00 
      C                   movel(p)  TimeNow       char500
411.00 
      C                   callp     updHtmlVar('TIMENOW':char500)
412.00 
       * Name of the mother_window input hidden field
413.00 
       * where the selected model should be transmitted
414.00 
      C                   callp     updHtmlVar('RETURNMDL':cgiinp50)
415.00 
       * Mr./Mrs./Miss
416.00 
      C                   callp     updHtmlVar('CGIINP01':cgiinp01)
417.00 
      C     cgiinp01      ifeq      '1'
418.00 
      C                   callp     updHtmlVar('MRMRSMISS':'Mr.')
419.00 
      C                   endif
420.00 
      C     cgiinp01      ifeq      '2'
421.00 
      C                   callp     updHtmlVar('MRMRSMISS':'Mrs.')
422.00 
      C                   endif
423.00 
      C     cgiinp01      ifeq      '3'
424.00 
      C                   callp     updHtmlVar('MRMRSMISS':'Miss')
425.00 
      C                   endif
426.00 
       * First name
427.00 
      C                   callp     updHtmlVar('CGIINP02':cgiinp02)
428.00 
       * Last name
429.00 
      C                   callp     updHtmlVar('CGIINP03':cgiinp03)
430.00 
       * Any kids?
431.00 
      C                   callp     updHtmlVar('CGIINP04':cgiinp04)
432.00 
       * Country
433.00 
      C                   callp     updHtmlVar('CGIINP05':cgiinp05)
434.00 
       * Car make number
435.00 
      C                   callp     updHtmlVar('CGIINP06':cgiinp06)
436.00 
       *
437.00 
      C                   endsr
438.00 
       *=====================================================================
439.00 
       * Set variables for section "form2kyn"
440.00 
       *=====================================================================
441.00 
      C     SetForm2k     begsr
442.00 
       * Country name
443.00 
      C                   callp     updHtmlVar('CGIINP05':cgiinp05)
444.00 
       * Color red?
445.00 
      C                   callp     updHtmlVar('COLOR07':color07)
446.00 
       * Bold?
447.00 
      C     Color07       ifeq      Red
448.00 
      C                   callp     updHtmlVar('B':Bold)
449.00 
      C                   callp     updHtmlVar('BE':Boldend)
450.00 
      C                   else
451.00 
      C                   callp     updHtmlVar('B':' ')
452.00 
      C                   callp     updHtmlVar('BE':' ')
453.00 
      C                   endif
454.00 
       * Car maker name
455.00 
      C                   callp     updHtmlVar('CARMKRNAM':carmkrnam)
456.00 
       *
457.00 
      C                   endsr
458.00 
       *=====================================================================
459.00 
       * Set variables for section "mdlrow"
460.00 
       *=====================================================================
461.00 
      C     SetMdlRow     begsr
462.00 
       * Model name
463.00 
      C                   callp     updHtmlVar('CARMDLNAM':carmdlnam)
464.00 
       * Model number
465.00 
      C                   movel(p)  carmdlnbr     char500
466.00 
      C                   callp     updHtmlVar('CARMDLNBR':char500)
467.00 
       *
468.00 
      C                   endsr
469.00 
       *=====================================================================
470.00 
       * Set variables for section "fin"
471.00 
       *=====================================================================
472.00 
      C     SetFin        begsr
473.00 
       * Mr./Mrs./Miss
474.00 
      C     cgiinp01      ifeq      '1'
475.00 
      C                   callp     updHtmlVar('MRMRSMISS':'Mr.')
476.00 
      C                   endif
477.00 
      C     cgiinp01      ifeq      '2'
478.00 
      C                   callp     updHtmlVar('MRMRSMISS':'Mrs.')
479.00 
      C                   endif
480.00 
      C     cgiinp01      ifeq      '3'
481.00 
      C                   callp     updHtmlVar('MRMRSMISS':'Miss')
482.00 
      C                   endif
483.00 
       * First name
484.00 
      C                   callp     updHtmlVar('CGIINP02':cgiinp02)
485.00 
       * Last name
486.00 
      C                   callp     updHtmlVar('CGIINP03':cgiinp03)
487.00 
       * Country
488.00 
      C                   callp     updHtmlVar('CGIINP05':cgiinp05)
489.00 
       * Car maker name
490.00 
      C                   callp     updHtmlVar('CARMKRNAM':carmkrnam)
491.00 
       * Car model name
492.00 
      C                   callp     updHtmlVar('CARMDLNAM':carmdlnam)
493.00 
       * Car maker number
494.00 
      C                   movel(p)  carmkrnbr     char500
495.00 
      C                   callp     updHtmlVar('CARMKRNBR':char500)
496.00 
       * Car model number
497.00 
      C                   movel(p)  carmdlnbr     char500
498.00 
      C                   callp     updHtmlVar('CARMDLNBR':char500)
499.00 
       * Car image extension
500.00 
      C                   callp     updHtmlVar('EXT':carmdlpct)
501.00 
       *
502.00 
      C                   endsr
503.00 
       *=====================================================================
504.00 
       * Ask the service program to load into core
505.00 
       * the appropriate output skeleton html member
506.00 
       *=====================================================================
507.00 
      C     LoadHtml      begsr
508.00 
      C                   eval      Fn  = 'HTMLSRC'
509.00 
      C                   eval      Lib = 'JS2'
510.00 
      C                   eval      Mbr = 'GETACAR' + %subst(Action:1:1)
511.00 
      C                   callp     gethtml(fn:lib:mbr)
512.00 
      C                   endsr
513.00 
       *=====================================================================
514.00 
       * Override and open the database files
515.00 
       * (only the first time through)
516.00 
       *=====================================================================
517.00 
      C     Ovrdbf        begsr
518.00 
      C                   IF        InitSW = ' '
519.00 
      C                   eval      InitSW = 'x'
520.00 
       * Countries
521.00 
      C                   eval      rc = docmd('OVRDBF FILE(COUNTRIES) +
522.00 
      C                             TOFILE(JS2/COUNTRIES) +
523.00 
      C                             SECURE(*YES)')
524.00 
       * Car makers, by name
525.00 
      C                   eval      rc = docmd('OVRDBF FILE(CARMKR01) +
526.00 
      C                             TOFILE(JS2/CARMKR01) +
527.00 
      C                             SECURE(*YES)')
528.00 
       * Car makers, by number
529.00 
      C                   eval      rc = docmd('OVRDBF FILE(CARMKR) +
530.00 
      C                             TOFILE(JS2/CARMKR) +
531.00 
      C                             SECURE(*YES)')
532.00 
       * Car models
533.00 
      C                   eval      rc = docmd('OVRDBF FILE(CARMDL) +
534.00 
      C                             TOFILE(JS2/CARMDL) +
535.00 
      C                             SECURE(*YES)')
536.00 
       *
537.00 
      C                   open      COUNTRIES
538.00 
      C                   open      CARMKR01
539.00 
      C                   open      CARMKR
540.00 
      C                   open      CARMDL
541.00 
       *
542.00 
      C                   ENDIF
543.00 
      C                   endsr
544.00 
       *=====================================================================
545.00 
       * Send response html and quit
546.00 
       *=====================================================================
547.00 
      C     Exit          begsr
548.00 
      C                   callp     wrtsection('end')
549.00 
       * Do not delete the call to wrtsection with section name *fini.  It is needed
550.00 
       * to ensure that all output html that has been buffered gets output.
551.00 
      C                   callp     wrtsection('*fini')
552.00 
       * Quit
553.00 
      C                   return
554.00 
      C                   endsr