Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 1




     1       1  !ldtbls.SQR
     2       1  !************************************************************************
     3       2  !												*
     4       3  !  $Date:: 1/15/98			$						*
     5       4  !  $Revision:: 1                	$						*
     6       5  !  $Workfil:: ldtbls.SQR     		$						*
     7       6  !												*
     8       7  !	Notes:										*
     9       8  !***********************************************************************
    10       9
    11      10  #define ORACLE
    12      11
    13      12  #define DOSOS2
    14      13
    15      14  #define null
    16      15
    17      16  #define TBLVARTYPE	VARCHAR2
    18      17  #define TBLNUMTYPE	NUMBER
    19      18  #define DATE		DATE
    20      19  #define money number (7,2)
    21      20
    22      21
    23      22  begin-setup
    24      23  end-setup
    25      24
    26      25  begin-heading 1
    27      26  end-heading
    28      27
    29      28  begin-footing 1
    30      29  end-footing
    31      30
    32      31  begin-report
    33      32        DO XSFC-SQR-EXECUTION('XFST_TABLE07',#XSFC-Instance,'Begin','ldtbls.sqr')
    34      33  	do Main
    35      34        DO XSFC-SQR-EXECUTION('XFST_TABLE07',#XSFC-Instance,'End','ldtbls.sqr')
    36      35  end-report
    37      36
    38      37  begin-procedure Main
    39      38  	Let $UserChoice = ''
    40      39  	while ($UserChoice <> 'Q')
    41      40  		do Get-User-Input($UserChoice)
    42      41  		evaluate $UserChoice
    43      42  			when='1'
    44      43  				do Begin-Table-Tran
    45      44  				do Create-All-Tables
    46      45  				do Commit-Table-Tran
    47      46  				break
    48      47  			when='2'
    49      48  				do Begin-Table-Tran
    50      49  				do Load-All-Tables

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 2




    51      50  				do Commit-Table-Tran
    52      51  				break
    53      52  			when='3'
    54      53  				do Begin-Table-Tran
    55      54  				do Create-All-Tables
    56      55  				do Commit-Table-Tran
    57      56
    58      57  				do Begin-Table-Tran
    59      58  				do Load-All-Tables
    60      59  				do Commit-Table-Tran
    61      60  				break
    62      61  			when-other
    63      62  				display 'Invalid User Choice'
    64      63  				break
    65      64  		end-evaluate
    66      65  	end-while
    67      66  end-procedure Main
    68      67
    69      68  begin-procedure Get-User-Input(:$UserChoice)
    70      69       Let $UserInputOK = 'N'
    71      70
    72      71       while ($UserInputOK <> 'Y')
    73      72          input $UserChoice  '1=Create Tables; 2.Load Tables; Q=End' type=char maxlen=1
    74      73          Let $UserChoice = upper($UserChoice)
    75      74  		if (($UserChoice > '0') AND
    76      75  			($UserChoice < '4'))
    77      76       		Let $UserInputOK = 'Y'		
    78      77  	 	else
    79      78  			if ($UserChoice = 'Q')
    80      79      			Let $UserInputOK = 'Y'		
    81      80  			else
    82      81   				Let $ErrMsg = '**** ' || $UserChoice || ' is not a valid Entry ****'
    83      82  				show $ErrMsg
    84      83  			end-if
    85      84  		end-if
    86      85      end-while
    87      86
    88      87  end-procedure Get-User-Input(:$UserChoice)
    89      88
    90      89  begin-Procedure Begin-Table-Tran
    91      90
    92      91  end-Procedure Begin-Table-Tran
    93      92
    94      93  begin-Procedure Commit-Table-Tran
    95      94
    96      95  		COMMIT
    97      96
    98      97  end-Procedure Commit-Table-Tran
    99      98
   100      99  #Include 'crldtbl.sqc'		!Create, Load Tables

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 3




   101          1  !************************************************************************
   102          2  !												*
   103          3  !  $Date:: 1/15/98		$							*
   104          4  !  $Revision:: 1                	$							*
   105          5  !  $Workfil:: crldtbl.sqc     	$							*
   106          6  !												*
   107          7  !	Notes:										*
   108          8  !***********************************************************************
   109          9
   110         10  begin-procedure Create-All-Tables
   111         11  	do Create-Table01
   112         12  	do Create-Table02
   113         13  	do Create-Table03
   114         14  	do Create-Table04
   115         15  	do Create-Table05
   116         16  	do Create-Table06
   117         17  	do Create-Table07
   118         18  	do Create-Table08
   119         19  	do Create-Table09
   120         20  	do Create-Table10
   121         21
   122         22  end-procedure Create-All-Tables
   123         23
   124         24  begin-procedure Load-All-Tables
   125         25  	do Load-Table01
   126         26  	do Load-Table02
   127         27  	do Load-Table03
   128         28  	do Load-Table04
   129         29  	do Load-Table05
   130         30  	do Load-Table06
   131         31  	do Load-Table07
   132         32  	do Load-Table08
   133         33  	do Load-Table09
   134         34  	do Load-Table10
   135         35
   136         36  end-procedure Load-All-Tables
   137         37
   138         38  #Include 'crtbl.sqc'		!Create Tables
   139             1  !************************************************************************
   140             2  !												*
   141             3  !  $Date:: 1/15/98		$							*
   142             4  !  $Revision:: 1                	$							*
   143             5  !  $Workfil:: crtbl.sqc     	$							*
   144             6  !												*
   145             7  !	Notes:										*
   146             8  !***********************************************************************
   147             9
   148            10  begin-procedure Create-Table01
   149            11  	Let $Table = 'appts'
   150            12  	do drop_table($Table)

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 4




   151            13  	begin-sql on-error=table_exists($Table)
   152            14  		CREATE TABLE [$Table]
   153            15              (appt_time        {TBLVARTYPE}(5) not null,
   154            16           	appt_date         {date}	not null,
   155            17           	appointment      {TBLVARTYPE}(45) not null)
   156            18  	end-sql
   157            19
   158            20  end-procedure Create-Table01
   159            21
   160            22  begin-procedure Create-Table02
   161            23  	Let $Table = 'cash_receipts'
   162            24  	do drop_table($Table)
   163            25  	begin-sql on-error=table_exists ($Table)
   164            26  		CREATE TABLE [$Table]
   165            27              (cust_num int     not null,
   166            28           	date_received    {date} not null,
   167            29           	amount_received  {money} not null)
   168            30  	end-sql
   169            31
   170            32  end-procedure Create-Table02
   171            33
   172            34  begin-procedure Create-Table03
   173            35  	Let $Table = 'customers'
   174            36  	do drop_table($Table)
   175            37
   176            38  	begin-sql on-error=table_exists ($Table)
   177            39  		CREATE TABLE [$Table]
   178            40              (cust_num         int not null,
   179            41  			name             {TBLVARTYPE} (30) {null},
   180            42           	addr1            {TBLVARTYPE} (30) {null},
   181            43           	addr2            {TBLVARTYPE} (30) {null},
   182            44           	city             {TBLVARTYPE} (16) {null},
   183            45           	state            {TBLVARTYPE} (02) {null},
   184            46           	zip              {TBLVARTYPE} (10) {null},
   185            47           	phone            {TBLVARTYPE} (10) {null},
   186            48           	tot              int {null})
   187            49  	end-sql
   188            50  end-procedure Create-Table03
   189            51
   190            52  begin-procedure Create-Table04
   191            53
   192            54  	Let $Table = 'dept'
   193            55  	do drop_table($Table)
   194            56
   195            57     begin-sql on-error=table_exists ($Table)
   196            58  		CREATE TABLE [$Table]
   197            59              (deptno           int not null,
   198            60  			dname            {TBLVARTYPE} (14) not null,
   199            61  			loc              {TBLVARTYPE} (20) not null)
   200            62

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 5




   201            63  	end-sql
   202            64
   203            65  end-procedure Create-Table04
   204            66
   205            67  begin-procedure Create-Table05
   206            68  	Let $Table = 'emp'
   207            69  	do drop_table($Table)
   208            70    begin-sql on-error=table_exists ($Table)
   209            71  		CREATE TABLE [$Table]
   210            72              (empno            int not null,
   211            73  			ename            {TBLVARTYPE} (10) not null,
   212            74  			sal              {money} not null,
   213            75  			comm             {money} {null},
   214            76  			deptno           int not null)
   215            77
   216            78
   217            79  	end-sql
   218            80
   219            81  end-procedure Create-Table05
   220            82
   221            83  begin-procedure Create-Table06
   222            84  	Let $Table = 'ordlines'
   223            85  	do drop_table($Table)
   224            86    begin-sql on-error=table_exists ($Table)
   225            87  		CREATE TABLE [$Table]
   226            88              (order_num        int not null,
   227            89  			product_code     int not null,
   228            90  			quantity         int not null)
   229            91     end-sql
   230            92
   231            93  end-procedure Create-Table06
   232            94
   233            95  begin-procedure Create-Table07
   234            96  	Let $Table = 'orders'
   235            97  	do drop_table($Table)
   236            98    begin-sql on-error=table_exists ($Table)
   237            99  		CREATE TABLE [$Table]
   238           100  			(order_date       {date} not null,
   239           101  			invoice_date     {date} {null},
   240           102  			order_num        int not null,
   241           103  			invoice_num      int {null},
   242           104  			cust_num         int not null,
   243           105  			ship_name        {TBLVARTYPE} (30) {null},
   244           106  			ship_addr1       {TBLVARTYPE} (30) {null},
   245           107  			ship_addr2       {TBLVARTYPE} (30) {null},
   246           108  			ship_city        {TBLVARTYPE} (16) {null},
   247           109  			ship_state       {TBLVARTYPE} (2) {null},
   248           110  			ship_zip         {TBLVARTYPE} (10) {null},
   249           111  			terms            {TBLVARTYPE} (20) {null},
   250           112  			shipped_via      {TBLVARTYPE} (20) {null},

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 6




   251           113  			comments         {TBLVARTYPE} (60) {null},
   252           114  			empno            int {null})
   253           115     end-sql
   254           116
   255           117  end-procedure Create-Table07
   256           118
   257           119  begin-procedure Create-Table08
   258           120  	Let $Table = 'products'
   259           121  	do drop_table($Table)
   260           122     begin-sql on-error=table_exists ($Table)
   261           123  		CREATE TABLE [$Table]
   262           124              (product_code     int not null,
   263           125  			description      {TBLVARTYPE} (60) not null,
   264           126  			price {money}    not null)
   265           127     end-sql
   266           128  end-procedure Create-Table08
   267           129
   268           130  begin-procedure Create-Table09
   269           131  	Let $Table = 'reminders'
   270           132  	do drop_table($Table)
   271           133     begin-sql on-error=table_exists ($Table)
   272           134  		CREATE TABLE [$Table]
   273           135              (remind_date      {date} not null,
   274           136  			reminder         {TBLVARTYPE} (240) not null)
   275           137     end-sql
   276           138
   277           139  end-procedure Create-Table09
   278           140
   279           141  begin-procedure Create-Table10
   280           142  	Let $Table = 'stocks'
   281           143  	do drop_table($Table)
   282           144     begin-sql on-error=table_exists ($Table)
   283           145  		CREATE TABLE [$Table]
   284           146              (stock            char (8) not null,
   285           147  			quote_date       {date} not null,
   286           148  			price            {money} not null)
   287           149     end-sql
   288           150
   289           151  end-procedure Create-Table10
   290           152
   291           153  begin-procedure drop_table ($table)
   292           154     begin-sql on-error=table_not_exists($table)
   293           155        DROP TABLE [$table]
   294           156     end-sql
   295           157  end-procedure
   296           158
   297           159  begin-procedure table_exists ($MySqlMsg)
   298           160     if #_sql-status != 6100
   299           161  	display $MySqlMsg
   300           162          display 'SQL Error status: '

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 7




   301           163          display #_sql-status
   302           164          display ' message:'
   303           165          display $_sql-error
   304           166          stop
   305           167     end-if
   306           168  end-procedure
   307           169
   308           170  begin-procedure table_not_exists($table)
   309           171  	display 'Table is not dropped: ' noline
   310           172  	display $table
   311           173  end-procedure
   312           174
   313           175  !End of Include File: crtbl.sqc
   314         39  #Include 'ldtbl.sqc'		!Load Tables
   315             1  !************************************************************************
   316             2  !												*
   317             3  !  $Date:: 1/15/98		$							*
   318             4  !  $Revision:: 1              $							*
   319             5  !  $Workfil:: ldtbl.sqc     	$							*
   320             6  !												*
   321             7  !	Notes:										*
   322             8  !***********************************************************************
   323             9
   324            10  begin-procedure Load-Table01
   325            11        open 'c:\sqr\odb\samplew\appts.dat' as 1 for-reading record=3000
   326            12        do read_appts
   327            13        close 1
   328            14  end-procedure Load-Table01
   329            15
   330            16  begin-procedure Load-Table02
   331            17        open 'c:\sqr\odb\samplew\cash.dat' as 1 for-reading record=3000
   332            18        do read_cash
   333            19        close 1
   334            20  end-procedure Load-Table02
   335            21
   336            22  begin-procedure Load-Table03
   337            23        open 'c:\sqr\odb\samplew\customer.dat' as 1 for-reading record=3000
   338            24        do read_customers
   339            25        close 1
   340            26  end-procedure Load-Table03
   341            27
   342            28  begin-procedure Load-Table04
   343            29        open 'c:\sqr\odb\samplew\dept.dat' as 1 for-reading record=3000
   344            30        do read_dept
   345            31        close 1
   346            32  end-procedure Load-Table04
   347            33
   348            34  begin-procedure Load-Table05
   349            35        open 'c:\sqr\odb\samplew\emp.dat' as 1 for-reading record=3000
   350            36        do read_emp

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 8




   351            37        close 1
   352            38  end-procedure Load-Table05
   353            39
   354            40  begin-procedure Load-Table06
   355            41        open 'c:\sqr\odb\samplew\ordlines.dat' as 1 for-reading record=3000
   356            42        do read_ordlines
   357            43        close 1
   358            44  end-procedure Load-Table06
   359            45
   360            46  begin-procedure Load-Table07
   361            47        open 'c:\sqr\odb\samplew\orders.dat' as 1 for-reading record=3000
   362            48        do read_orders
   363            49        close 1
   364            50  end-procedure Load-Table07
   365            51
   366            52  begin-procedure Load-Table08
   367            53        open 'c:\sqr\odb\samplew\products.dat' as 1 for-reading record=3000
   368            54        do read_products
   369            55        close 1
   370            56  end-procedure Load-Table08
   371            57
   372            58  begin-procedure Load-Table09
   373            59        open 'c:\sqr\odb\samplew\reminder.dat' as 1 for-reading record=3000
   374            60        do read_reminders
   375            61        close 1
   376            62  end-procedure Load-Table09
   377            63
   378            64  begin-procedure Load-Table10
   379            65        open 'c:\sqr\odb\samplew\stocks.dat' as 1 for-reading record=3000
   380            66        do read_stocks
   381            67        close 1
   382            68  end-procedure Load-Table10
   383            69
   384            70
   385            71  begin-procedure read_appts
   386            72     show 'Inserting records from file appts.dat into appts ...'
   387            73     move 0 to #inserts
   388            74     move 0 to #tot-recs
   389            75     Let $sepchar = '|'
   390            76     while 1 = 1
   391            77        read 1 into $x:3000
   392            78        if #end-file = 1
   393            79           break             ! End of file.
   394            80        end-if
   395            81        unstring $x by $sepchar into -
   396            82           $appt_date_string -
   397            83           $appt_time -
   398            84           $appointment
   399            85        !
   400            86        ! Use the strtodate function to move the date into a date variable.

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 9




   401            87        ! This will ensure the date will be in the correct DB format.
   402            88        !
   403            89        do Convert-Date-Oracle($appt_date_string,$OracDate)
   404            90  	  Let $appt_date_string = $OracDate
   405            91        do insert_appts
   406            92        add 1 to #tot-recs
   407            93     end-while
   408            94     show '  Total records inserted: ' #tot-recs edit 999,999
   409            95  end-procedure
   410            96
   411            97  begin-procedure insert_appts
   412            98     begin-sql
   413            99        insert into appts (
   414           100           appt_time,
   415           101           appt_date,
   416           102           appointment)
   417           103        values (
   418           104           $appt_time,
   419           105           $appt_date_string,
   420           106           $appointment)
   421           107     end-sql
   422           108  end-procedure
   423           109
   424           110  begin-procedure read_cash
   425           111     show 'Inserting records from file cash.dat into cash_receipts ...'
   426           112     move 0 to #inserts
   427           113     move 0 to #tot-recs
   428           114     while 1 = 1
   429           115        read 1 into $x:3000
   430           116        if #end-file = 1
   431           117           break             ! End of file.
   432           118        end-if
   433           119        unstring $x by $sepchar into -
   434           120           $cust_num -
   435           121           $date_received_string -
   436           122           $amount_received
   437           123        move $cust_num to #cust_num
   438           124        !
   439           125        ! Use the strtodate function to move the date into a date variable.
   440           126        ! This will ensure the date will be in the correct DB format.
   441           127        !
   442           128
   443           129        do Convert-Date-Oracle($date_received_string,$OracDate)
   444           130  	  Let $date_received_string = $OracDate
   445           131
   446           132        move $amount_received to #amount_received
   447           133        do insert_cash
   448           134        add 1 to #tot-recs
   449           135     end-while
   450           136     show '  Total records inserted: ' #tot-recs edit 999,999

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 10




   451           137  end-procedure
   452           138
   453           139  begin-procedure insert_cash
   454           140
   455           141     begin-sql
   456           142        insert into cash_receipts (
   457           143           cust_num,
   458           144           date_received,
   459           145           amount_received)
   460           146        values (
   461           147           #cust_num,
   462           148           $date_received_string,
   463           149           #amount_received)
   464           150     end-sql
   465           151  end-procedure
   466           152
   467           153  begin-procedure read_customers
   468           154     show 'Inserting records from file customer.dat into customers ...'
   469           155     move 0 to #inserts
   470           156     move 0 to #tot-recs
   471           157     while 1 = 1
   472           158        read 1 into $x:3000
   473           159        if #end-file = 1
   474           160           break             ! End of file.
   475           161        end-if
   476           162        unstring $x by $sepchar into -
   477           163           $cust_num -
   478           164           $name -
   479           165           $addr1 -
   480           166           $addr2 -
   481           167           $city -
   482           168           $state -
   483           169           $zip -
   484           170           $phone -
   485           171           $tot
   486           172        move $cust_num to #cust_num
   487           173        move $tot to #tot
   488           174        do insert_customers
   489           175        add 1 to #tot-recs
   490           176     end-while
   491           177     show '  Total records inserted: ' #tot-recs edit 999,999
   492           178  end-procedure
   493           179
   494           180  begin-procedure insert_customers
   495           181     begin-sql
   496           182        insert into customers (
   497           183           cust_num,
   498           184           name,
   499           185           addr1,
   500           186           addr2,

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 11




   501           187           city,
   502           188           state,
   503           189           zip,
   504           190           phone,
   505           191           tot)
   506           192        values (
   507           193           #cust_num,
   508           194           $name,
   509           195           $addr1,
   510           196           $addr2,
   511           197           $city,
   512           198           $state,
   513           199           $zip,
   514           200           $phone,
   515           201           #tot)
   516           202     end-sql
   517           203  end-procedure
   518           204
   519           205  begin-procedure read_dept
   520           206     show 'Inserting records from file dept.dat into dept ...'
   521           207     move 0 to #inserts
   522           208     move 0 to #tot-recs
   523           209     while 1 = 1
   524           210        read 1 into $x:3000
   525           211        if #end-file = 1
   526           212           break             ! End of file.
   527           213        end-if
   528           214        unstring $x by $sepchar into -
   529           215           $deptno -
   530           216           $dname -
   531           217           $loc
   532           218        move $deptno to #deptno
   533           219        do insert_dept
   534           220        add 1 to #tot-recs
   535           221     end-while
   536           222     show '  Total records inserted: ' #tot-recs edit 999,999
   537           223  end-procedure
   538           224
   539           225  begin-procedure insert_dept
   540           226
   541           227     begin-sql
   542           228        insert into dept (
   543           229           deptno,
   544           230           dname,
   545           231           loc)
   546           232        values (
   547           233           #deptno,
   548           234           $dname,
   549           235           $loc)
   550           236  end-sql

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 12




   551           237  end-procedure
   552           238
   553           239
   554           240  begin-procedure read_emp
   555           241     show 'Inserting records from file emp.dat into emp ...'
   556           242     move 0 to #inserts
   557           243     move 0 to #tot-recs
   558           244     while 1 = 1
   559           245        read 1 into $x:3000
   560           246        if #end-file = 1
   561           247           break             ! End of file.
   562           248        end-if
   563           249        unstring $x by $sepchar into -
   564           250           $empno -
   565           251           $ename -
   566           252           $sal -
   567           253           $comm -
   568           254           $deptno
   569           255        move $empno to #empno
   570           256        move $sal to #sal
   571           257        move $comm to #comm
   572           258        move $deptno to #deptno
   573           259        do insert_emp
   574           260        add 1 to #tot-recs
   575           261     end-while
   576           262     show '  Total records inserted: ' #tot-recs edit 999,999
   577           263  end-procedure
   578           264
   579           265  begin-procedure insert_emp
   580           266
   581           267     begin-sql
   582           268        insert into emp (
   583           269           empno,
   584           270           ename,
   585           271           sal,
   586           272           comm,
   587           273           deptno)
   588           274        values (
   589           275           #empno,
   590           276           $ename,
   591           277           #sal,
   592           278           #comm,
   593           279           #deptno)
   594           280     end-sql
   595           281  end-procedure
   596           282
   597           283
   598           284  begin-procedure read_ordlines
   599           285     show 'Inserting records from file ordlines.dat into ordlines ...'
   600           286     move 0 to #inserts

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 13




   601           287     move 0 to #tot-recs
   602           288     while 1 = 1
   603           289        read 1 into $x:3000
   604           290        if #end-file = 1
   605           291           break             ! End of file.
   606           292        end-if
   607           293        unstring $x by $sepchar into -
   608           294           $order_num -
   609           295           $product_code -
   610           296           $quantity
   611           297        move $order_num to #order_num
   612           298        move $product_code to #product_code
   613           299        move $quantity to #quantity
   614           300        do insert_ordlines
   615           301        add 1 to #tot-recs
   616           302     end-while
   617           303     show '  Total records inserted: ' #tot-recs edit 999,999
   618           304  end-procedure
   619           305
   620           306  begin-procedure insert_ordlines
   621           307
   622           308     begin-sql
   623           309        insert into ordlines (
   624           310           order_num,
   625           311           product_code,
   626           312           quantity)
   627           313        values (
   628           314           #order_num,
   629           315           #product_code,
   630           316           #quantity)
   631           317     end-sql
   632           318  end-procedure
   633           319
   634           320  begin-procedure read_orders
   635           321     show 'Inserting records from file orders.dat into orders ...'
   636           322     move 0 to #inserts
   637           323     move 0 to #tot-recs
   638           324     while 1 = 1
   639           325        read 1 into $x:3000
   640           326        if #end-file = 1
   641           327           break             ! End of file.
   642           328        end-if
   643           329        unstring $x by $sepchar into -
   644           330           $order_num -
   645           331           $order_date_string -
   646           332           $invoice_num -
   647           333           $invoice_date_string -
   648           334           $cust_num -
   649           335           $ship_name -
   650           336           $ship_addr1 -

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 14




   651           337           $ship_addr2 -
   652           338           $ship_city -
   653           339           $ship_state -
   654           340           $ship_zip -
   655           341           $terms -
   656           342           $shipped_via -
   657           343           $comments -
   658           344           $empno
   659           345        move $order_num to #order_num
   660           346        move $invoice_num to #invoice_num
   661           347        move $cust_num to #cust_num
   662           348        move $empno to #empno
   663           349        !
   664           350        ! Use the strtodate function to move the date into a date variable.
   665           351        ! This will ensure the date will be in the correct DB format.
   666           352        !
   667           353        do Convert-Date-Oracle($order_date_string,$OracDate)
   668           354  	  Let $order_date_string = $OracDate
   669           355
   670           356        do Convert-Date-Oracle($invoice_date_string,$OracDate)
   671           357  	  Let $invoice_date_string = $OracDate
   672           358
   673           359        do insert_orders
   674           360        add 1 to #tot-recs
   675           361     end-while
   676           362     show '  Total records inserted: ' #tot-recs edit 999,999
   677           363  end-procedure
   678           364
   679           365  begin-procedure insert_orders
   680           366
   681           367     begin-sql
   682           368        insert into orders (
   683           369           order_num,
   684           370           order_date,
   685           371           invoice_num,
   686           372           invoice_date,
   687           373           cust_num,
   688           374           ship_name,
   689           375           ship_addr1,
   690           376           ship_addr2,
   691           377           ship_city,
   692           378           ship_state,
   693           379           ship_zip,
   694           380           terms,
   695           381           shipped_via,
   696           382           comments,
   697           383           empno)
   698           384        values (
   699           385           #order_num,
   700           386           $order_date_string,

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 15




   701           387           #invoice_num,
   702           388           $invoice_date_string,
   703           389           #cust_num,
   704           390           $ship_name,
   705           391           $ship_addr1,
   706           392           $ship_addr2,
   707           393           $ship_city,
   708           394           $ship_state,
   709           395           $ship_zip,
   710           396           $terms,
   711           397           $shipped_via,
   712           398           $comments,
   713           399           #empno)
   714           400     end-sql
   715           401  end-procedure
   716           402
   717           403  begin-procedure read_products
   718           404     show 'Inserting records from file products.dat into products ...'
   719           405     move 0 to #inserts
   720           406     move 0 to #tot-recs
   721           407     while 1 = 1
   722           408        read 1 into $x:3000
   723           409        if #end-file = 1
   724           410           break             ! End of file.
   725           411        end-if
   726           412        unstring $x by $sepchar into -
   727           413           $product_code -
   728           414           $description -
   729           415           $price
   730           416        move $product_code to #product_code
   731           417        move $price to #price
   732           418        do insert_products
   733           419        add 1 to #tot-recs
   734           420     end-while
   735           421     show '  Total records inserted: ' #tot-recs edit 999,999
   736           422  end-procedure
   737           423
   738           424  begin-procedure insert_products
   739           425
   740           426     begin-sql
   741           427        insert into products (
   742           428           product_code,
   743           429           description,
   744           430           price)
   745           431        values (
   746           432           #product_code,
   747           433           $description,
   748           434           #price)
   749           435     end-sql
   750           436  end-procedure

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 16




   751           437
   752           438  begin-procedure read_reminders
   753           439     show 'Inserting records from file reminder.dat into reminders ...'
   754           440     move 0 to #inserts
   755           441     move 0 to #tot-recs
   756           442     while 1 = 1
   757           443        read 1 into $x:3000
   758           444        if #end-file = 1
   759           445           break             ! End of file.
   760           446        end-if
   761           447        unstring $x by $sepchar into -
   762           448           $remind_date_string -
   763           449           $reminder
   764           450
   765           451        do Convert-Date-Oracle($remind_date_string,$OracDate)
   766           452  	  Let $remind_date_string = $OracDate
   767           453
   768           454        do insert_reminders
   769           455        add 1 to #tot-recs
   770           456     end-while
   771           457     show '  Total records inserted: ' #tot-recs edit 999,999
   772           458  end-procedure
   773           459
   774           460  begin-procedure insert_reminders
   775           461
   776           462     begin-sql
   777           463        insert into reminders (
   778           464           remind_date,
   779           465           reminder
   780           466           )
   781           467        values (
   782           468           $remind_date_string,
   783           469           $reminder
   784           470           )
   785           471     end-sql
   786           472  end-procedure
   787           473
   788           474  begin-procedure read_stocks
   789           475     show 'Inserting records from file stocks.dat into stocks ...'
   790           476     move 0 to #inserts
   791           477     move 0 to #tot-recs
   792           478     while 1 = 1
   793           479        read 1 into $x:3000
   794           480        if #end-file = 1
   795           481           break             ! End of file.
   796           482        end-if
   797           483        unstring $x by $sepchar into -
   798           484           $stock -
   799           485           $quote_date_string -
   800           486           $price

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 17




   801           487        move $price to #price
   802           488
   803           489        do Convert-Date-Oracle($quote_date_string,$OracDate)
   804           490  	  Let $quote_date_string = $OracDate
   805           491
   806           492        do insert_stocks
   807           493        #ifDEF ORACLE
   808           494           add 1 to #inserts
   809           495           if #inserts >= 50
   810           496              commit
   811           497              move 0 to #inserts
   812           498           end-if
   813           499        #endif
   814           500        add 1 to #tot-recs
   815           501     end-while
   816           502     show '  Total records inserted: ' #tot-recs edit 999,999
   817           503  end-procedure
   818           504
   819           505  begin-procedure insert_stocks
   820           506     begin-sql
   821           507        insert into stocks (
   822           508           stock,
   823           509           quote_date,
   824           510           price)
   825           511        values (
   826           512           $stock,
   827           513           $quote_date_string,
   828           514           #price)
   829           515     end-sql
   830           516  end-procedure
   831           517
   832           518  begin-procedure Convert-Date-Oracle($dateYYYYMMDD,:$NewDate)
   833           519  	Let $YY = substr($dateYYYYMMDD,3,2)
   834           520  	Let $MM = substr($dateYYYYMMDD,5,2)
   835           521  	Let $DD = substr($dateYYYYMMDD,7,2)
   836           522  	evaluate $MM
   837           523  		when='01'
   838           524  			Let $Mon = 'JAN'
   839           525  			break
   840           526  		when='02'
   841           527  			Let $Mon = 'FEB'
   842           528  			break
   843           529  		when='03'
   844           530  			Let $Mon = 'MAR'
   845           531  			break
   846           532  		when='04'
   847           533  			Let $Mon = 'APR'
   848           534  			break
   849           535  		when='05'
   850           536  			Let $Mon = 'MAY'

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 18




   851           537  			break
   852           538  		when='06'
   853           539  			Let $Mon = 'JUN'
   854           540  			break
   855           541  		when='07'
   856           542  			Let $Mon = 'JUL'
   857           543  			break
   858           544  		when='08'
   859           545  			Let $Mon = 'AUG'
   860           546  			break
   861           547  		when='09'
   862           548  			Let $Mon = 'SEP'
   863           549  			break
   864           550  		when='10'
   865           551  			Let $Mon = 'OCT'
   866           552  			break
   867           553  		when='11'
   868           554  			Let $Mon = 'NOV'
   869           555  			break
   870           556  		when='12'
   871           557  			Let $Mon = 'DEC'
   872           558  			break
   873           559  		when-other
   874           560  			Let $Mon = ''
   875           561  	end-evaluate
   876           562  	Let $NewDate = $DD || '-' || $MON || '-' || $YY
   877           563  end-procedure Convert-Date-Oracle($dateYYYYMMDD)
   878           564  !End of Include File: ldtbl.sqc
   879         40  !End of Include File: crldtbl.sqc
   880     100
   881     101  #Include 'XFSINCL.SQC'
   882          1  #define XFSORACLE
   883          2  #define XFSRDBMSNAME 'ORACLE'
   884          3  !************************************************************************									*
   885          4  !               Confidentiality Information:				*
   886          5  !									*
   887          6  ! This module is the confidential and proprietary information of	*
   888          7  ! TCS INC (USA), which is supplied as part of SQR Tools.    This file	*
   889          8  ! would be automatically added with modifications into SQR files by SQR	*
   890          9  ! Tools.  This file is not to be copied reprodcued, added as include 	*
   891         10  ! file in any SQR or transmitted in any form, by any means, in whole or	*
   892         11  ! in part, nor is it to be used for any	purpose other than that for 	*
   893         12  ! which it is expressly provided without the written permission of 	*
   894         13  ! Textile Computer Systems (USA).					*
   895         14  !									*
   896         15  !***********************************************************************
   897         16  #ifndef	XFSRDBMSNAME
   898         17  	#define		XFSINFORMIX
   899         18  	#define		XFSRDBMSNAME	'INFORMIX'
   900         19  #endif

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 19




   901         20
   902         21  begin-procedure XSFC-SQR-EXECUTION($WhichTable,:#WhichInstance,$Where,$WhichSqr)
   903         22  	do XSFC-Get-Curr-DateTime($XSFC-Date,$XSFC-Time,$XSFC-DateTime,$XSFC-ShortDateTime)
   904         23  	Let $XFSC-SqrName = upper($WhichSqr)
   905         24  	if ($Where = 'Begin')
   906         25  		do XFSC-GET-INSTANCE($WhichTable,$XFSC-SqrName,#WhichInstance)
   907         26  		Let #WhichInstance = #WhichInstance + 1			
   908         27  		do XFSC-Begin-Table-Tran
   909         28  		if (rtrim($_username,' ') = '')
   910         29  			Let $XFSC-UserName = ' '
   911         30  		else
   912         31  			Let $XFSC-UserName = $_username
   913         32  		end-if
   914         33
   915         34  		Let $XFSCSqlErrorMsg = 'Table: ' || $WhichTable
   916         35  		begin-sql On-Error=XFSC-Insert-Sql-Error($XFSCSqlErrorMsg)
   917         36  			INSERT INTO [$WhichTable]
   918         37  						(XFSF_SQRNAME,
   919         38  						XFSF_COUNT,
   920         39  						XFSF_RDBMS,
   921         40  						XFSF_USERNAME,
   922         41  						XFSF_PLATFORM,
   923         42  						XFSF_STARTDATETIME,
   924         43  						XFSF_ENDDATETIME,
   925         44  						XFSF_TYPE,
   926         45  						XFSF_TIME)
   927         46  			VALUES ($XFSC-SqrName,
   928         47  						#WhichInstance,
   929         48  						$_sqr-database,
   930         49  						$XFSC-UserName,
   931         50  						$_sqr-platform,
   932         51  						$XSFC-ShortDateTime,
   933         52  						$XSFC-ShortDateTime,
   934         53  						'I',
   935         54  						'00:00')
   936         55
   937         56  		end-sql		
   938         57  		do XFSC-Commit-Table-Tran
   939         58  	end-if
   940         59  	if ($Where = 'End')
   941         60  		do XFSC-Begin-Table-Tran
   942         61  		Let $XFSCSqlErrorMsg = 'Table: ' || $WhichTable
   943         62  		begin-sql On-Error=XFSC-Update-Sql-Error($XFSCSqlErrorMsg)
   944         63  			update [$WhichTable]
   945         64  				set XFSF_ENDDATETIME = $XSFC-ShortDateTime,
   946         65  					XFSF_TYPE = 'C'
   947         66  			where XFSF_SQRNAME = $XFSC-SqrName
   948         67  			and   XFSF_COUNT = #WhichInstance
   949         68  		end-sql
   950         69  		do XFSC-Commit-Table-Tran

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 20




   951         70  	end-if
   952         71  end-procedure XSFC-SQR-EXECUTION($WhichTable,:#WhichInstance,$Where,$WhichSqr)
   953         72
   954         73  begin-procedure XSFC-Get-Curr-DateTime(:$OutDate,:$OutTime,:$OutDateTime,:$ShortOutDateTime)
   955         74  	#ifdef XFSALLBASE
   956         75  		DATE-TIME	()	'YYYY-MM-DD'	&SysDate
   957         76  		DATE-TIME	()	'HH:MI:SS'		&SysTime
   958         77  		Let $OutDate = &SysDate
   959         78  		Let $OutTime = &SysTime
   960         79  	#endif
   961         80  	#ifdef XFSDB2
   962         81  		DATE-TIME	()	'YYYY-MM-DD'	&SysDate
   963         82  		DATE-TIME	()	'HH:MI:SS'		&SysTime
   964         83  		Let $OutDate = &SysDate
   965         84  		Let $OutTime = &SysTime
   966         85  	#endif
   967         86  	#ifdef XFSINFORMIX
   968         87  		DATE-TIME	()	'YYYY-MM-DD'	&SysDate
   969         88  		DATE-TIME	()	'HH:MI:SS'		&SysTime
   970         89  		Let $OutDate = &SysDate
   971         90  		Let $OutTime = &SysTime
   972         91  	#endif
   973         92  	#ifdef XFSINFORMIX_NON_ANSI
   974         93  		DATE-TIME	()	'YYYY-MM-DD'	&SysDate
   975         94  		DATE-TIME	()	'HH:MI:SS'		&SysTime
   976         95  		Let $OutDate = &SysDate
   977         96  		Let $OutTime = &SysTime
   978         97  	#endif
   979         98  	#ifdef XFSINGRES
   980         99  		DATE-TIME	()	'DD-MON-YYYY'	&SysDate
   981        100  		DATE-TIME	()	'HH:MI:SS'		&SysTime
   982        101  		Let $SysDate = &SysDate
   983        102  		Let $OutTime = &SysTime
   984        103  		do XSFC-Convert-To-DefaultDate('DD-MON-YYYY', $SysDate, $NewDate)
   985        104  		Let $OutDate = $NewDate
   986        105  	#endif
   987        106  	#ifdef XFSORACLE
   988        107  		DATE-TIME	()	'DD-MON-YYYY'	&SysDate
   989        108  		DATE-TIME	()	'HH:MI PM'		&SysTime
   990        109  		Let $SysDate = &SysDate
   991        110  		Let $SysTime = &SysTime
   992        111  		do XSFC-Convert-To-DefaultDate('DD-MON-YYYY', $SysDate, $NewDate)
   993        112  		Let $OutDate = $NewDate
   994        113  		do XSFC-Convert-To-DefaultTime($SysTime, $NewTime)
   995        114  		Let $OutTime = $NewTime
   996        115
   997        116  	#endif
   998        117  	#ifdef XFSRDB
   999        118  		DATE-TIME	()	'DD-MON-YYYY'	&SysDate
  1000        119  		DATE-TIME	()	'HH:MI'			&SysTime

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 21




  1001        120  		Let $SysDate = &SysDate
  1002        121  		Let $OutTime = &SysTime || ':00'
  1003        122  		do XSFC-Convert-To-DefaultDate('DD-MON-YYYY', $SysDate, $NewDate)
  1004        123  		Let $OutDate = $NewDate
  1005        124  	#endif
  1006        125  	#ifdef XFSSQLBASE
  1007        126  		DATE-TIME	()	'DD-MON-YYYY'	&SysDate
  1008        127  		DATE-TIME	()	'HH:MI PM'		&SysTime
  1009        128  		Let $SysDate = &SysDate
  1010        129  		Let $SysTime = &SysTime
  1011        130  		do XSFC-Convert-To-DefaultDate('DD-MON-YYYY', $SysDate, $NewDate)
  1012        131  		Let $OutDate = $NewDate
  1013        132  		do XSFC-Convert-To-DefaultTime($SysTime, $NewTime)
  1014        133  		Let $OutTime = $NewTime
  1015        134  	#endif
  1016        135  	#ifdef XFSSYBASE
  1017        136  		DATE-TIME	()	'DD-MON-YYYY'	&SysDate
  1018        137  		DATE-TIME	()	'HH:MI:SS'		&SysTime
  1019        138  		Let $SysDate = &SysDate
  1020        139  		Let $OutTime = &SysTime
  1021        140  		do XSFC-Convert-To-DefaultDate('DD-MON-YYYY', $SysDate, $NewDate)
  1022        141  		Let $OutDate = $NewDate
  1023        142  	#endif
  1024        143  	Let $OutDateTime = $OutDate || ' ' || $OutTime
  1025        144  	Let $ShortOutDateTime = substr($OutDateTime,1,4) ||
  1026        145  							substr($OutDateTime,6,2) ||
  1027        146  							substr($OutDateTime,9,2) ||
  1028        147  							substr($OutDateTime,12,2) ||
  1029        148  							substr($OutDateTime,15,2) ||
  1030        149  							substr($OutDateTime,18,2)
  1031        150  end-procedure XSFC-Get-Curr-DateTime(:$OutDate,:$OutTime,:OutDateTime,:$ShortOutDateTime)
  1032        151
  1033        152  begin-procedure XSFC-Convert-To-DefaultDate($InFormat, $SysDate, :$NewDate)
  1034        153  	if ($InFormat = 'DD-MON-YYYY')
  1035        154  		Let $InMon = upper(substr($SysDate,4,3))
  1036        155  		evaluate $InMon
  1037        156  			when='JAN'
  1038        157  				Let $NewMon = '01'
  1039        158  			break
  1040        159  			when='FEB'
  1041        160  				Let $NewMon = '02'
  1042        161  			break
  1043        162  			when='MAR'
  1044        163  				Let $NewMon = '03'
  1045        164  			break
  1046        165  			when='APR'
  1047        166  				Let $NewMon = '04'
  1048        167  			break
  1049        168  			when='MAY'
  1050        169  				Let $NewMon = '05'

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 22




  1051        170  			break
  1052        171  			when='JUNE'
  1053        172  				Let $NewMon = '06'
  1054        173  			break
  1055        174  			when='JULY'
  1056        175  				Let $NewMon = '07'
  1057        176  			break
  1058        177  			when='AUG'
  1059        178  				Let $NewMon = '08'
  1060        179  			break
  1061        180  			when='SEP'
  1062        181  				Let $NewMon = '09'
  1063        182  			break
  1064        183  			when='OCT'
  1065        184  				Let $NewMon = '10'
  1066        185  			break
  1067        186  			when='NOV'
  1068        187  				Let $NewMon = '11'
  1069        188  			break
  1070        189  			when='DEC'
  1071        190  				Let $NewMon = '12'
  1072        191  			break
  1073        192  			when-other
  1074        193  				display 'Wrong date format: ' noline
  1075        194  				display $SysDate
  1076        195  				STOP
  1077        196  			break
  1078        197  		end-evaluate
  1079        198  		Let $NewDate = substr($SysDate,8,4) || '-' ||
  1080        199  				$NewMon || '-' || substr($SysDate,1,2)
  1081        200  	else
  1082        201  		Let $NewDate = $SysDate
  1083        202  	end-if
  1084        203  end-procedure XSFC-Convert-To-DefaultDate($InFormat, $SysDate, :$NewDate)
  1085        204
  1086        205  begin-procedure XSFC-Convert-To-DefaultTime($SysTime, :$NewTime)
  1087        206  	Let $SysAmPm = substr($SysTime,7,2)
  1088        207
  1089        208  	Let #SysHour = to_number(substr($SysTime,1,2))
  1090        209  	if (($SysAmPm = 'PM') AND (#SysHour < 12))
  1091        210  		Let #SysHour = #SysHour + 12
  1092        211  	end-if
  1093        212  	if (($SysAmPm = 'AM') AND (#SysHour > 11))
  1094        213  		Let #SysHour = 0
  1095        214  	end-if
  1096        215  	Let #SysMinute = to_number(substr($SysTime,4,2))
  1097        216
  1098        217  	Let $NewTime = edit(#SysHour,'00') || ':' || edit(#SysMinute,'00') ||
  1099        218  					':00'
  1100        219  end-procedure XSFC-Convert-To-DefaultTime($SysTime, :$NewTime)

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 23




  1101        220
  1102        221  begin-procedure XFSC-GET-INSTANCE($WhichTable,$WhichSqr,:#WhichInstance)
  1103        222  	Let #WhichInstance = 0
  1104        223  begin-select
  1105        224  MAX(XFSF_COUNT)	&XFSFACount
  1106        225  	Let #WhichInstance = &XFSFACount
  1107        226  FROM [$WhichTable] XFSTA
  1108        227  WHERE XFSF_SQRNAME = $WhichSqr
  1109        228  end-select
  1110        229  end-procedure XFSC-GET-INSTANCE($WhichTable,$WhichSqr,#WhichInstance)
  1111        230
  1112        231  begin-Procedure XFSC-Begin-Table-Tran
  1113        232
  1114        233  	#ifdef XFSALLBASE
  1115        234  	#endif
  1116        235  	#ifdef XFSDB2
  1117        236  	#endif
  1118        237  	#ifdef XFSINFORMIX
  1119        238  	#endif
  1120        239  	#ifdef XFSINFORMIX_NON_ANSI
  1121        240  		begin-sql
  1122        241  			BEGIN WORK
  1123        242  		end-sql
  1124        243  	#endif
  1125        244  	#ifdef XFSINGRES
  1126        245  	#endif
  1127        246  	#ifdef XFSORACLE
  1128        247  	#endif
  1129        248  	#ifdef XFSRDB
  1130        249  	#endif
  1131        250  	#ifdef XFSSQLBASE
  1132        251  	#endif
  1133        252  	#ifdef XFSSYBASE
  1134        253  		begin-sql
  1135        254  			BEGIN TRANSACTION
  1136        255  		end-sql
  1137        256  	#endif
  1138        257
  1139        258  end-Procedure XFSC-Begin-Table-Tran
  1140        259
  1141        260
  1142        261  begin-Procedure XFSC-Commit-Table-Tran
  1143        262
  1144        263  	#ifdef XFSALLBASE
  1145        264  		COMMIT
  1146        265  	#endif
  1147        266  	#ifdef XFSDB2
  1148        267  		COMMIT
  1149        268  	#endif
  1150        269  	#ifdef XFSINFORMIX

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 24




  1151        270  		begin-sql
  1152        271  			COMMIT WORK
  1153        272  		end-sql
  1154        273  	#endif
  1155        274  	#ifdef XFSINFORMIX_NON_ANSI
  1156        275  		begin-sql
  1157        276  			COMMIT WORK
  1158        277  		end-sql
  1159        278  	#endif
  1160        279  	#ifdef XFSINGRES
  1161        280  		COMMIT
  1162        281  	#endif
  1163        282  	#ifdef XFSORACLE
  1164        283  		COMMIT
  1165        284  	#endif
  1166        285  	#ifdef XFSRDB
  1167        286  		COMMIT
  1168        287  	#endif
  1169        288  	#ifdef XFSSQLBASE
  1170        289  		COMMIT
  1171        290  	#endif
  1172        291  	#ifdef XFSSYBASE
  1173        292  		begin-sql
  1174        293  			COMMIT TRANSACTION
  1175        294  		end-sql
  1176        295  	#endif
  1177        296
  1178        297  end-Procedure XFSC-Commit-Table-Tran
  1179        298
  1180        299  begin-procedure XFSC-Update-Sql-Error($XFSCSqlErrorMsg)
  1181        300
  1182        301  	display 'Update'
  1183        302  	display $XFSCSqlErrorMsg
  1184        303  	display 'SQL Error Status: ' noline
  1185        304  	display #_sql-status
  1186        305  	display 'SQL Error Message: ' noline
  1187        306  	display $_sql-error
  1188        307
  1189        308  end-procedure XFSC-Update-Sql-Error($XFSCSqlErrorMsg)
  1190        309
  1191        310  begin-procedure XFSC-Insert-Sql-Error($XFSCSqlErrorMsg)
  1192        311  	display 'Insert'
  1193        312  	display $XFSCSqlErrorMsg
  1194        313  	display 'SQL Error Status: ' noline
  1195        314  	display #_sql-status
  1196        315  	display 'SQL Error Message: ' noline
  1197        316  	display $_sql-error
  1198        317  end-procedure XSFC-Insert-Sql-Error($XFSCSqlErrorMsg)
  1199        318
  1200        319  !End of Include File: XFSINCL.SQC

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                                 Listing of SQR File: ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 25




  1201     102  !End of Main File: ldtbls.SQR

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                            Files used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 26

 File  File Name                  Remarks        Directory
  No

   1 ldtbls.SQR                                  C:\demo\prod\sqr\
   2   crldtbl.sqc                               C:\demo\prod\sqc\
   3     crtbl.sqc                               C:\demo\test\sqc\
   4     ldtbl.sqc                               C:\demo\prod\sqc\
   5   XFSINCL.SQC                               C:\demo\prod\sqc\

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                 Tree Structure of Procedures Used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 27

 Used  Used Procedure Name                  Parameters
 Proc
  No
   1 BEGIN-REPORT
   2   XSFC-SQR-EXECUTION                             'XFST_TABLE07',#XSFC-Instance,'Begin','ldtbls.sqr'
   3     XSFC-GET-CURR-DATETIME                       $XSFC-Date,$XSFC-Time,$XSFC-DateTime,$XSFC-ShortDateTime
   4       XSFC-CONVERT-TO-DEFAULTDATE                'DD-MON-YYYY', $SysDate, $NewDate
   5       XSFC-CONVERT-TO-DEFAULTTIME                $SysTime, $NewTime
   6     XFSC-GET-INSTANCE                            $WhichTable,$XFSC-SqrName,#WhichInstance
   7     XFSC-BEGIN-TABLE-TRAN
   8     XFSC-COMMIT-TABLE-TRAN
   9     XFSC-BEGIN-TABLE-TRAN
  10     XFSC-COMMIT-TABLE-TRAN
  11   MAIN
  12     GET-USER-INPUT                               $UserChoice
  13     BEGIN-TABLE-TRAN
  14     CREATE-ALL-TABLES
  15       CREATE-TABLE01
  16         DROP_TABLE                               $Table
  17       CREATE-TABLE02
  18         DROP_TABLE                               $Table
  19       CREATE-TABLE03
  20         DROP_TABLE                               $Table
  21       CREATE-TABLE04
  22         DROP_TABLE                               $Table
  23       CREATE-TABLE05
  24         DROP_TABLE                               $Table
  25       CREATE-TABLE06
  26         DROP_TABLE                               $Table
  27       CREATE-TABLE07
  28         DROP_TABLE                               $Table
  29       CREATE-TABLE08
  30         DROP_TABLE                               $Table
  31       CREATE-TABLE09
  32         DROP_TABLE                               $Table
  33       CREATE-TABLE10
  34         DROP_TABLE                               $Table
  35     COMMIT-TABLE-TRAN
  36     BEGIN-TABLE-TRAN
  37     LOAD-ALL-TABLES
  38       LOAD-TABLE01
  39         READ_APPTS
  40           CONVERT-DATE-ORACLE                    $appt_date_string,$OracDate
  41           INSERT_APPTS
  42       LOAD-TABLE02
  43         READ_CASH
  44           CONVERT-DATE-ORACLE                    $date_received_string,$OracDate
  45           INSERT_CASH
  46       LOAD-TABLE03
  47         READ_CUSTOMERS
  48           INSERT_CUSTOMERS
  49       LOAD-TABLE04
  50         READ_DEPT

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                 Tree Structure of Procedures Used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 28

 Used  Used Procedure Name                  Parameters
 Proc
  No
  51           INSERT_DEPT
  52       LOAD-TABLE05
  53         READ_EMP
  54           INSERT_EMP
  55       LOAD-TABLE06
  56         READ_ORDLINES
  57           INSERT_ORDLINES
  58       LOAD-TABLE07
  59         READ_ORDERS
  60           CONVERT-DATE-ORACLE                    $order_date_string,$OracDate
  61           CONVERT-DATE-ORACLE                    $invoice_date_string,$OracDate
  62           INSERT_ORDERS
  63       LOAD-TABLE08
  64         READ_PRODUCTS
  65           INSERT_PRODUCTS
  66       LOAD-TABLE09
  67         READ_REMINDERS
  68           CONVERT-DATE-ORACLE                    $remind_date_string,$OracDate
  69           INSERT_REMINDERS
  70       LOAD-TABLE10
  71         READ_STOCKS
  72           CONVERT-DATE-ORACLE                    $quote_date_string,$OracDate
  73           INSERT_STOCKS
  74     COMMIT-TABLE-TRAN
  75     BEGIN-TABLE-TRAN
  76     CREATE-ALL-TABLES
  77       *** Refer to Used Proc No.   14
  78     COMMIT-TABLE-TRAN
  79     BEGIN-TABLE-TRAN
  80     LOAD-ALL-TABLES
  81       *** Refer to Used Proc No.   37
  82     COMMIT-TABLE-TRAN
  83   XSFC-SQR-EXECUTION                             'XFST_TABLE07',#XSFC-Instance,'End','ldtbls.sqr'
  84     *** Refer to Used Proc No.    2

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                        Procedures Declared in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 29

 Decl    Procedure Name & Parameters             File Expn      File      Type
 Proc                                            No * Line      Line
  No                                                   No        No
   1     BEGIN-REPORT                              1     32        31     Global
   2     BEGIN-TABLE-TRAN                          1     90        89     Global
                                                   1     44        43
                                                   1     49        48
                                                   1     54        53
                                                   1     58        57
   3     COMMIT-TABLE-TRAN                         1     94        93     Global
                                                   1     46        45
                                                   1     51        50
                                                   1     56        55
                                                   1     60        59
   4     CONVERT-DATE-ORACLE                       4    832       518     Local
         $DATEYYYYMMDD,:$NEWDATE
                                                   4    403        89
                                                   4    443       129
                                                   4    667       353
                                                   4    670       356
                                                   4    765       451
                                                   4    803       489
   5     CREATE-ALL-TABLES                         2    110        10     Global
                                                   1     45        44
                                                   1     55        54
   6     CREATE-TABLE01                            3    148        10     Global
                                                   2    111        11
   7     CREATE-TABLE02                            3    160        22     Global
                                                   2    112        12
   8     CREATE-TABLE03                            3    172        34     Global
                                                   2    113        13
   9     CREATE-TABLE04                            3    190        52     Global
                                                   2    114        14
  10     CREATE-TABLE05                            3    205        67     Global
                                                   2    115        15
  11     CREATE-TABLE06                            3    221        83     Global
                                                   2    116        16
  12     CREATE-TABLE07                            3    233        95     Global
                                                   2    117        17
  13     CREATE-TABLE08                            3    257       119     Global
                                                   2    118        18
  14     CREATE-TABLE09                            3    268       130     Global
                                                   2    119        19
  15     CREATE-TABLE10                            3    279       141     Global
                                                   2    120        20
  16     DROP_TABLE                                3    291       153     Local
         $TABLE
  17     GET-USER-INPUT                            1     69        68     Local
         :$USERCHOICE
                                                   1     41        40
  18     INSERT_APPTS                              4    411        97     Global
                                                   4    405        91
  19     INSERT_CASH                               4    453       139     Global

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                        Procedures Declared in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 30

 Decl    Procedure Name & Parameters             File Expn      File      Type
 Proc                                            No * Line      Line
  No                                                   No        No
                                                   4    447       133
  20     INSERT_CUSTOMERS                          4    494       180     Global
                                                   4    488       174
  21     INSERT_DEPT                               4    539       225     Global
                                                   4    533       219
  22     INSERT_EMP                                4    579       265     Global
                                                   4    573       259
  23     INSERT_ORDERS                             4    679       365     Global
                                                   4    673       359
  24     INSERT_ORDLINES                           4    620       306     Global
                                                   4    614       300
  25     INSERT_PRODUCTS                           4    738       424     Global
                                                   4    732       418
  26     INSERT_REMINDERS                          4    774       460     Global
                                                   4    768       454
  27     INSERT_STOCKS                             4    819       505     Global
                                                   4    806       492
  28     LOAD-ALL-TABLES                           2    124        24     Global
                                                   1     50        49
                                                   1     59        58
  29     LOAD-TABLE01                              4    324        10     Global
                                                   2    125        25
  30     LOAD-TABLE02                              4    330        16     Global
                                                   2    126        26
  31     LOAD-TABLE03                              4    336        22     Global
                                                   2    127        27
  32     LOAD-TABLE04                              4    342        28     Global
                                                   2    128        28
  33     LOAD-TABLE05                              4    348        34     Global
                                                   2    129        29
  34     LOAD-TABLE06                              4    354        40     Global
                                                   2    130        30
  35     LOAD-TABLE07                              4    360        46     Global
                                                   2    131        31
  36     LOAD-TABLE08                              4    366        52     Global
                                                   2    132        32
  37     LOAD-TABLE09                              4    372        58     Global
                                                   2    133        33
  38     LOAD-TABLE10                              4    378        64     Global
                                                   2    134        34
  39     MAIN                                      1     38        37     Global
                                                   1     34        33
  40     READ_APPTS                                4    385        71     Global
                                                   4    326        12
  41     READ_CASH                                 4    424       110     Global
                                                   4    332        18
  42     READ_CUSTOMERS                            4    467       153     Global
                                                   4    338        24
  43     READ_DEPT                                 4    519       205     Global
                                                   4    344        30

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                        Procedures Declared in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 31

 Decl    Procedure Name & Parameters             File Expn      File      Type
 Proc                                            No * Line      Line
  No                                                   No        No
  44     READ_EMP                                  4    554       240     Global
                                                   4    350        36
  45     READ_ORDERS                               4    634       320     Global
                                                   4    362        48
  46     READ_ORDLINES                             4    598       284     Global
                                                   4    356        42
  47     READ_PRODUCTS                             4    717       403     Global
                                                   4    368        54
  48     READ_REMINDERS                            4    752       438     Global
                                                   4    374        60
  49     READ_STOCKS                               4    788       474     Global
                                                   4    380        66
  50     TABLE_EXISTS                              3    297       159     Local
         $MYSQLMSG
  51     TABLE_NOT_EXISTS                          3    308       170     Local
         $TABLE
  52     XFSC-BEGIN-TABLE-TRAN                     5   1112       231     Global
                                                   5    908        27
                                                   5    941        60
  53     XFSC-COMMIT-TABLE-TRAN                    5   1142       261     Global
                                                   5    938        57
                                                   5    950        69
  54     XFSC-GET-INSTANCE                         5   1102       221     Local
         $WHICHTABLE,$WHICHSQR,:#WHICHINSTANCE
                                                   5    906        25
  55     XFSC-INSERT-SQL-ERROR                     5   1191       310     Local
         $XFSCSQLERRORMSG
  56     XFSC-UPDATE-SQL-ERROR                     5   1180       299     Local
         $XFSCSQLERRORMSG
  57     XSFC-CONVERT-TO-DEFAULTDATE               5   1033       152     Local
         $INFORMAT, $SYSDATE, :$NEWDATE
                                                   5    992       111
  58     XSFC-CONVERT-TO-DEFAULTTIME               5   1086       205     Local
         $SYSTIME, :$NEWTIME
                                                   5    994       113
  59     XSFC-GET-CURR-DATETIME                    5    954        73     Local
         :$OUTDATE,:$OUTTIME,:$OUTDATETIME,:$SHORTOUTDATETIME
                                                   5    903        22
  60     XSFC-SQR-EXECUTION                        5    902        21     Local
         $WHICHTABLE,:#WHICHINSTANCE,$WHERE,$WHICHSQR
                                                   1     33        32
                                                   1     35        34

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                            Tables Used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 32

 Used  Used Table Name                           File Expn      File      Mode
 Table                                           No * Line      Line
  No                                                   No        No
   1     APPTS                                     4    413        99     I
   2     CASH_RECEIPTS                             4    456       142     I
   3     CUSTOMERS                                 4    496       182     I
   4     DEPT                                      4    542       228     I
   5     EMP                                       4    582       268     I
   6     ORDERS                                    4    682       368     I
   7     ORDLINES                                  4    623       309     I
   8     PRODUCTS                                  4    741       427     I
   9     REMINDERS                                 4    777       463     I
  10     STOCKS                                    4    821       507     I
  11     [$WHICHTABLE]                             5   1107       226     R

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                       Variable Listing used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 33

         Variable Name                  File       Proc      Expn     File      Varibale  Alternate
                                        No *       No **     Line     Line      Type      Name
                                                              No        No
   1     #AMOUNT_RECEIVED                 4        41         446       132     Global
                                                   19         463       149     Global
   2     #COMM                            4        44         571       257     Global
                                                   22         592       278     Global
   3     #CUST_NUM                        4        41         437       123     Global
                                                   19         461       147     Global
                                                   42         486       172     Global
                                                   20         507       193     Global
                                                   45         661       347     Global
                                                   23         703       389     Global
   4     #DEPTNO                          4        43         532       218     Global
                                                   21         547       233     Global
                                                   44         572       258     Global
                                                   22         593       279     Global
   5     #EMPNO                           4        44         569       255     Global
                                                   22         589       275     Global
                                                   45         662       348     Global
                                                   23         713       399     Global
   6     #INSERTS                         4        40         387        73     Global
                                                   41         426       112     Global
                                                   42         469       155     Global
                                                   43         521       207     Global
                                                   44         556       242     Global
                                                   46         600       286     Global
                                                   45         636       322     Global
                                                   47         719       405     Global
                                                   48         754       440     Global
                                                   49         790       476     Global
                                                              808       494     Global
                                                              809       495     Global
                                                              811       497     Global
   7     #INVOICE_NUM                     4        45         660       346     Global
                                                   23         701       387     Global
   8     #ORDER_NUM                       4        46         611       297     Global
                                                   24         628       314     Global
                                                   45         659       345     Global
                                                   23         699       385     Global
   9     #PRICE                           4        47         731       417     Global
                                                   25         748       434     Global
                                                   49         801       487     Global
                                                   27         828       514     Global
  10     #PRODUCT_CODE                    4        46         612       298     Global
                                                   24         629       315     Global
                                                   47         730       416     Global
                                                   25         746       432     Global
  11     #QUANTITY                        4        46         613       299     Global
                                                   24         630       316     Global
  12     #SAL                             4        44         570       256     Global
                                                   22         591       277     Global
  13     #SQL-STATUS                      3        50         298       160     Global    #_SQL-STATUS

 *   To see tha names of the Files refer to Files used report
 **  To see tha names of the Procedures refer to Procedures declared report
 *** Warning Variable, with '_' in second position, is used in Global Procedure
 *** Warning Passed Variable not used in Local Procedure

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                       Variable Listing used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 34

         Variable Name                  File       Proc      Expn     File      Varibale  Alternate
                                        No *       No **     Line     Line      Type      Name
                                                              No        No
  13     #SQL-STATUS                                          301       163     Global    #_SQL-STATUS
                                          5        56        1185       304     Global    #_SQL-STATUS
                                                   55        1195       314     Global    #_SQL-STATUS
  14     #SYSHOUR                         5        58        1089       208     Local
                                                             1090       209     Local
                                                             1091       210     Local
                                                             1093       212     Local
                                                             1094       213     Local
                                                             1098       217     Local
  15     #SYSMINUTE                       5        58        1096       215     Local
                                                             1098       217     Local
  16     #TOT                             4        42         487       173     Global
                                                   20         515       201     Global
  17     #TOT-RECS                        4        40         388        74     Global
                                                              406        92     Global
                                                              408        94     Global
                                                   41         427       113     Global
                                                              448       134     Global
                                                              450       136     Global
                                                   42         470       156     Global
                                                              489       175     Global
                                                              491       177     Global
                                                   43         522       208     Global
                                                              534       220     Global
                                                              536       222     Global
                                                   44         557       243     Global
                                                              574       260     Global
                                                              576       262     Global
                                                   46         601       287     Global
                                                              615       301     Global
                                                              617       303     Global
                                                   45         637       323     Global
                                                              674       360     Global
                                                              676       362     Global
                                                   47         720       406     Global
                                                              733       419     Global
                                                              735       421     Global
                                                   48         755       441     Global
                                                              769       455     Global
                                                              771       457     Global
                                                   49         791       477     Global
                                                              814       500     Global
                                                              816       502     Global
  18     #WHICHINSTANCE                   5        60         906        25     Passed
                                                              907        26     Passed
                                                              928        47     Passed
                                                              948        67     Passed
                                                   54        1103       222     Passed
                                                             1106       225     Passed
  19     #XSFC-INSTANCE                   1         1          33        32     Global

 *   To see tha names of the Files refer to Files used report
 **  To see tha names of the Procedures refer to Procedures declared report
 *** Warning Variable, with '_' in second position, is used in Global Procedure
 *** Warning Passed Variable not used in Local Procedure

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                       Variable Listing used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 35

         Variable Name                  File       Proc      Expn     File      Varibale  Alternate
                                        No *       No **     Line     Line      Type      Name
                                                              No        No
  19     #XSFC-INSTANCE                                        35        34     Global
  20     $ADDR1                           4        42         479       165     Global
                                                   20         509       195     Global
  21     $ADDR2                           4        42         480       166     Global
                                                   20         510       196     Global
  22     $AMOUNT_RECEIVED                 4        41         436       122     Global
                                                              446       132     Global
  23     $APPOINTMENT                     4        40         398        84     Global
                                                   18         420       106     Global
  24     $APPT_DATE_STRING                4        40         396        82     Global
                                                              403        89     Global
                                                              404        90     Global
                                                   18         419       105     Global
  25     $APPT_TIME                       4        40         397        83     Global
                                                   18         418       104     Global
  26     $CITY                            4        42         481       167     Global
                                                   20         511       197     Global
  27     $COMM                            4        44         567       253     Global
                                                              571       257     Global
  28     $COMMENTS                        4        45         657       343     Global
                                                   23         712       398     Global
  29     $CUST_NUM                        4        41         434       120     Global
                                                              437       123     Global
                                                   42         477       163     Global
                                                              486       172     Global
                                                   45         648       334     Global
                                                              661       347     Global
  30     $DATEYYYYMMDD                    4         4         833       519     Local
                                                              834       520     Local
                                                              835       521     Local
  31     $DATE_RECEIVED_STRING            4        41         435       121     Global
                                                              443       129     Global
                                                              444       130     Global
                                                   19         462       148     Global
  32     $DD                              4         4         835       521     Local
                                                              876       562     Local
  33     $DEPTNO                          4        43         529       215     Global
                                                              532       218     Global
                                                   44         568       254     Global
                                                              572       258     Global
  34     $DESCRIPTION                     4        47         728       414     Global
                                                   25         747       433     Global
  35     $DNAME                           4        43         530       216     Global
                                                   21         548       234     Global
  36     $EMPNO                           4        44         564       250     Global
                                                              569       255     Global
                                                   45         658       344     Global
                                                              662       348     Global
  37     $ENAME                           4        44         565       251     Global
                                                   22         590       276     Global

 *   To see tha names of the Files refer to Files used report
 **  To see tha names of the Procedures refer to Procedures declared report
 *** Warning Variable, with '_' in second position, is used in Global Procedure
 *** Warning Passed Variable not used in Local Procedure

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                       Variable Listing used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 36

         Variable Name                  File       Proc      Expn     File      Varibale  Alternate
                                        No *       No **     Line     Line      Type      Name
                                                              No        No
  38     $ERRMSG                          1        17          82        81     Local
                                                               83        82     Local
  39     $INFORMAT                        5        57        1034       153     Local
  40     $INMON                           5        57        1035       154     Local
                                                             1036       155     Local
  41     $INVOICE_DATE_STRING             4        45         647       333     Global
                                                              670       356     Global
                                                              671       357     Global
                                                   23         702       388     Global
  42     $INVOICE_NUM                     4        45         646       332     Global
                                                              660       346     Global
  43     $LOC                             4        43         531       217     Global
                                                   21         549       235     Global
  44     $MM                              4         4         834       520     Local
                                                              836       522     Local
  45     $MON                             4         4         838       524     Local
                                                              841       527     Local
                                                              844       530     Local
                                                              847       533     Local
                                                              850       536     Local
                                                              853       539     Local
                                                              856       542     Local
                                                              859       545     Local
                                                              862       548     Local
                                                              865       551     Local
                                                              868       554     Local
                                                              871       557     Local
                                                              874       560     Local
                                                              876       562     Local
  46     $MYSQLMSG                        3        50         299       161     Local
  47     $NAME                            4        42         478       164     Global
                                                   20         508       194     Global
  48     $NEWDATE                         4         4         876       562     Passed
                                          5        59         992       111     Local
                                                              993       112     Local
                                                   57        1079       198     Passed
                                                             1082       201     Passed
  49     $NEWMON                          5        57        1038       157     Local
                                                             1041       160     Local
                                                             1044       163     Local
                                                             1047       166     Local
                                                             1050       169     Local
                                                             1053       172     Local
                                                             1056       175     Local
                                                             1059       178     Local
                                                             1062       181     Local
                                                             1065       184     Local
                                                             1068       187     Local
                                                             1071       190     Local
                                                             1080       199     Local

 *   To see tha names of the Files refer to Files used report
 **  To see tha names of the Procedures refer to Procedures declared report
 *** Warning Variable, with '_' in second position, is used in Global Procedure
 *** Warning Passed Variable not used in Local Procedure

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                       Variable Listing used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 37

         Variable Name                  File       Proc      Expn     File      Varibale  Alternate
                                        No *       No **     Line     Line      Type      Name
                                                              No        No
  50     $NEWTIME                         5        59         994       113     Local
                                                              995       114     Local
                                                   58        1098       217     Passed
  51     $ORACDATE                        4        40         403        89     Global
                                                              404        90     Global
                                                   41         443       129     Global
                                                              444       130     Global
                                                   45         667       353     Global
                                                              668       354     Global
                                                              670       356     Global
                                                              671       357     Global
                                                   48         765       451     Global
                                                              766       452     Global
                                                   49         803       489     Global
                                                              804       490     Global
  52     $ORDER_DATE_STRING               4        45         645       331     Global
                                                              667       353     Global
                                                              668       354     Global
                                                   23         700       386     Global
  53     $ORDER_NUM                       4        46         608       294     Global
                                                              611       297     Global
                                                   45         644       330     Global
                                                              659       345     Global
  54     $OUTDATE                         5        59         993       112     Passed
                                                             1024       143     Passed
  55     $OUTDATETIME                     5        59        1024       143     Passed
                                                             1025       144     Passed
                                                             1026       145     Passed
                                                             1027       146     Passed
                                                             1028       147     Passed
                                                             1029       148     Passed
                                                             1030       149     Passed
  56     $OUTTIME                         5        59         995       114     Passed
                                                             1024       143     Passed
  57     $PHONE                           4        42         484       170     Global
                                                   20         514       200     Global
  58     $PRICE                           4        47         729       415     Global
                                                              731       417     Global
                                                   49         800       486     Global
                                                              801       487     Global
  59     $PRODUCT_CODE                    4        46         609       295     Global
                                                              612       298     Global
                                                   47         727       413     Global
                                                              730       416     Global
  60     $QUANTITY                        4        46         610       296     Global
                                                              613       299     Global
  61     $QUOTE_DATE_STRING               4        49         799       485     Global
                                                              803       489     Global
                                                              804       490     Global
                                                   27         827       513     Global

 *   To see tha names of the Files refer to Files used report
 **  To see tha names of the Procedures refer to Procedures declared report
 *** Warning Variable, with '_' in second position, is used in Global Procedure
 *** Warning Passed Variable not used in Local Procedure

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                       Variable Listing used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 38

         Variable Name                  File       Proc      Expn     File      Varibale  Alternate
                                        No *       No **     Line     Line      Type      Name
                                                              No        No
  62     $REMINDER                        4        48         763       449     Global
                                                   26         783       469     Global
  63     $REMIND_DATE_STRING              4        48         762       448     Global
                                                              765       451     Global
                                                              766       452     Global
                                                   26         782       468     Global
  64     $SAL                             4        44         566       252     Global
                                                              570       256     Global
  65     $SEPCHAR                         4        40         389        75     Global
                                                              395        81     Global
                                                   41         433       119     Global
                                                   42         476       162     Global
                                                   43         528       214     Global
                                                   44         563       249     Global
                                                   46         607       293     Global
                                                   45         643       329     Global
                                                   47         726       412     Global
                                                   48         761       447     Global
                                                   49         797       483     Global
  66     $SHIPPED_VIA                     4        45         656       342     Global
                                                   23         711       397     Global
  67     $SHIP_ADDR1                      4        45         650       336     Global
                                                   23         705       391     Global
  68     $SHIP_ADDR2                      4        45         651       337     Global
                                                   23         706       392     Global
  69     $SHIP_CITY                       4        45         652       338     Global
                                                   23         707       393     Global
  70     $SHIP_NAME                       4        45         649       335     Global
                                                   23         704       390     Global
  71     $SHIP_STATE                      4        45         653       339     Global
                                                   23         708       394     Global
  72     $SHIP_ZIP                        4        45         654       340     Global
                                                   23         709       395     Global
  73     $SHORTOUTDATETIME                5        59        1025       144     Passed
  74     $SQL-ERROR                       3        50         303       165     Global    $_SQL-ERROR
                                          5        56        1187       306     Global    $_SQL-ERROR
                                                   55        1197       316     Global    $_SQL-ERROR
  75     $SQR-DATABASE                    5        60         929        48     Global    $_SQR-DATABASE
  76     $SQR-PLATFORM                    5        60         931        50     Global    $_SQR-PLATFORM
  77     $STATE                           4        42         482       168     Global
                                                   20         512       198     Global
  78     $STOCK                           4        49         798       484     Global
                                                   27         826       512     Global
  79     $SYSAMPM                         5        58        1087       206     Local
                                                             1090       209     Local
                                                             1093       212     Local
  80     $SYSDATE                         5        59         990       109     Local
                                                              992       111     Local
                                                   57        1035       154     Local
                                                             1075       194     Local

 *   To see tha names of the Files refer to Files used report
 **  To see tha names of the Procedures refer to Procedures declared report
 *** Warning Variable, with '_' in second position, is used in Global Procedure
 *** Warning Passed Variable not used in Local Procedure

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                       Variable Listing used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 39

         Variable Name                  File       Proc      Expn     File      Varibale  Alternate
                                        No *       No **     Line     Line      Type      Name
                                                              No        No
  80     $SYSDATE                                            1079       198     Local
                                                             1080       199     Local
                                                             1082       201     Local
  81     $SYSTIME                         5        59         991       110     Local
                                                              994       113     Local
                                                   58        1087       206     Local
                                                             1089       208     Local
                                                             1096       215     Local
  82     $TABLE                           3         6         149        11     Global
                                                              150        12     Global
                                                              151        13     Global
                                                              152        14     Global
                                                    7         161        23     Global
                                                              162        24     Global
                                                              163        25     Global
                                                              164        26     Global
                                                    8         173        35     Global
                                                              174        36     Global
                                                              176        38     Global
                                                              177        39     Global
                                                    9         192        54     Global
                                                              193        55     Global
                                                              195        57     Global
                                                              196        58     Global
                                                   10         206        68     Global
                                                              207        69     Global
                                                              208        70     Global
                                                              209        71     Global
                                                   11         222        84     Global
                                                              223        85     Global
                                                              224        86     Global
                                                              225        87     Global
                                                   12         234        96     Global
                                                              235        97     Global
                                                              236        98     Global
                                                              237        99     Global
                                                   13         258       120     Global
                                                              259       121     Global
                                                              260       122     Global
                                                              261       123     Global
                                                   14         269       131     Global
                                                              270       132     Global
                                                              271       133     Global
                                                              272       134     Global
                                                   15         280       142     Global
                                                              281       143     Global
                                                              282       144     Global
                                                              283       145     Global
                                                   16         292       154     Local
                                                              293       155     Local

 *   To see tha names of the Files refer to Files used report
 **  To see tha names of the Procedures refer to Procedures declared report
 *** Warning Variable, with '_' in second position, is used in Global Procedure
 *** Warning Passed Variable not used in Local Procedure

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                       Variable Listing used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 40

         Variable Name                  File       Proc      Expn     File      Varibale  Alternate
                                        No *       No **     Line     Line      Type      Name
                                                              No        No
  82     $TABLE                                    51         310       172     Local
  83     $TERMS                           4        45         655       341     Global
                                                   23         710       396     Global
  84     $TOT                             4        42         485       171     Global
                                                              487       173     Global
  85     $USERCHOICE                      1        39          39        38     Global
                                                               40        39     Global
                                                               41        40     Global
                                                               42        41     Global
                                                   17          73        72     Passed
                                                               74        73     Passed
                                                               75        74     Passed
                                                               76        75     Passed
                                                               79        78     Passed
                                                               82        81     Passed
  86     $USERINPUTOK                     1        17          70        69     Local
                                                               72        71     Local
                                                               77        76     Local
                                                               80        79     Local
  87     $USERNAME                        5        60         909        28     Global    $_USERNAME
                                                              912        31     Global    $_USERNAME
  88     $WHERE                           5        60         905        24     Local
                                                              940        59     Local
  89     $WHICHSQR                        5        60         904        23     Local
                                                   54        1108       227     Local
  90     $WHICHTABLE                      5        60         906        25     Local
                                                              915        34     Local
                                                              917        36     Local
                                                              942        61     Local
                                                              944        63     Local
                                                   54        1107       226     Local
  91     $X                               4        40         391        77     Global
                                                              395        81     Global
                                                   41         429       115     Global
                                                              433       119     Global
                                                   42         472       158     Global
                                                              476       162     Global
                                                   43         524       210     Global
                                                              528       214     Global
                                                   44         559       245     Global
                                                              563       249     Global
                                                   46         603       289     Global
                                                              607       293     Global
                                                   45         639       325     Global
                                                              643       329     Global
                                                   47         722       408     Global
                                                              726       412     Global
                                                   48         757       443     Global
                                                              761       447     Global
                                                   49         793       479     Global

 *   To see tha names of the Files refer to Files used report
 **  To see tha names of the Procedures refer to Procedures declared report
 *** Warning Variable, with '_' in second position, is used in Global Procedure
 *** Warning Passed Variable not used in Local Procedure

                          Customer Demo  Program: c:\ins\xfdbg\debo010.sqt (Expiration Date: 1998-10-29)
                                       Variable Listing used in C:\demo\prod\sqr\ldtbls.SQR
                                              Date: 1998-10-15 19:20:00  Page No: 41

         Variable Name                  File       Proc      Expn     File      Varibale  Alternate
                                        No *       No **     Line     Line      Type      Name
                                                              No        No
  91     $X                                                   797       483     Global
  92     $XFSC-SQRNAME                    5        60         904        23     Local
                                                              906        25     Local
                                                              927        46     Local
                                                              947        66     Local
  93     $XFSC-USERNAME                   5        60         910        29     Local
                                                              912        31     Local
                                                              930        49     Local
  94     $XFSCSQLERRORMSG                 5        60         915        34     Local
                                                              916        35     Local
                                                              942        61     Local
                                                              943        62     Local
                                                   56        1183       302     Local
                                                   55        1193       312     Local
  95     $XSFC-DATE                       5        60         903        22     Local
  96     $XSFC-DATETIME                   5        60         903        22     Local
  97     $XSFC-SHORTDATETIME              5        60         903        22     Local
                                                              932        51     Local
                                                              933        52     Local
                                                              945        64     Local
  98     $XSFC-TIME                       5        60         903        22     Local
  99     $YY                              4         4         833       519     Local
                                                              876       562     Local
 100     $ZIP                             4        42         483       169     Global
                                                   20         513       199     Global


























 *   To see tha names of the Files refer to Files used report
 **  To see tha names of the Procedures refer to Procedures declared report
 *** Warning Variable, with '_' in second position, is used in Global Procedure
 *** Warning Passed Variable not used in Local Procedure

Home