home *** CD-ROM | disk | FTP | other *** search
/ Program Metropolis - Software Boutique 95 / SOFTWARECD.iso / camipro3 / macros.cmz / DBASVIEW.SMM < prev    next >
Encoding:
INI File  |  1994-08-14  |  8.9 KB  |  650 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     
  5. [files]
  6. [charset]
  7.     82
  8.     CHINESEBIG5 (Windows)
  9. [revisions]
  10.     0
  11. [prn]
  12.     HP LaserJet III
  13. [port]
  14.     LPT2:
  15. [lang]
  16.     1
  17. [desc]
  18.     ┼¬¿· dBase └╔«╫¿├┤ú¿╤─µª∞╕Ω░TíC½╪Ñ▀ªX¿╓╢lÑ≤⌐╥╗▌¬║ Ami Pro ╗í⌐·└╔íC
  19.     Lotus WPD Technical Support
  20.     Advanced
  21.     fopen, fread, Arrays
  22.     
  23.     773101123
  24.     30
  25.     676574628
  26.     583
  27.     3
  28.     0
  29.     0
  30.     0
  31.     0
  32.     Fread, Arrays, 
  33.     
  34.     
  35.     
  36.     
  37.     
  38.     0
  39. [fopts]
  40.     0
  41.     1
  42.     0
  43.     0
  44. [lnopts]
  45.     2
  46.     Body Text
  47.     1
  48. [docopts]
  49.     5
  50.     2
  51. [GramStyle]
  52.     
  53. [tag]
  54.     Body Text
  55.     2
  56.     [fnt]
  57.         Times New Roman
  58.         240
  59.         0
  60.         49152
  61.     [algn]
  62.         1
  63.         2
  64.         0
  65.         0
  66.         0
  67.     [spc]
  68.         17
  69.         0
  70.         2
  71.         0
  72.         0
  73.         2
  74.         100
  75.     [brk]
  76.         4
  77.     [line]
  78.         8
  79.         0
  80.         2
  81.         0
  82.         1
  83.         1
  84.         1
  85.         10
  86.         10
  87.         2
  88.     [spec]
  89.         0
  90.         0
  91.         
  92.         0
  93.         2
  94.         1
  95.         0
  96.         0
  97.         0
  98.         0
  99.     [nfmt]
  100.         280
  101.         1
  102.         2
  103.         .
  104.         ,
  105.         NT$
  106.     Body Text
  107.     0
  108.     0
  109. [lay]
  110.     Standard
  111.     513
  112.     [rght]
  113.         15840
  114.         12240
  115.         1
  116.         1440
  117.         1440
  118.         1
  119.         1440
  120.         1440
  121.         2
  122.         1
  123.         0
  124.         1
  125.         1
  126.         2
  127.         1
  128.         1440
  129.         10800
  130.         5
  131.         1
  132.         720
  133.         1
  134.         1440
  135.         1
  136.         2880
  137.         1
  138.         4320
  139.         1
  140.         5760
  141.     [hrght]
  142.     [lyfrm]
  143.         1
  144.         11200
  145.         0
  146.         0
  147.         12240
  148.         1440
  149.         0
  150.         1
  151.         3
  152.         1 0 0 0 0 0 0
  153.         0
  154.         0
  155.         1
  156.     [frmlay]
  157.         1440
  158.         12240
  159.         1
  160.         1440
  161.         0
  162.         1
  163.         270
  164.         1440
  165.         0
  166.         1
  167.         0
  168.         1
  169.         1
  170.         0
  171.         1
  172.         1440
  173.         10800
  174.         0
  175.     [txt]
  176.  
  177. <+B>Peyton McManus
  178.  
  179. <+B>DataGet
  180.  
  181. <+B>Page <:P10,0,>
  182.  
  183. >
  184.     [frght]
  185.     [lyfrm]
  186.         1
  187.         13248
  188.         0
  189.         14400
  190.         12240
  191.         15840
  192.         0
  193.         1
  194.         3
  195.         1 0 0 0 0 0 0
  196.         0
  197.         0
  198.         2
  199.     [frmlay]
  200.         15840
  201.         12240
  202.         1
  203.         1440
  204.         360
  205.         1
  206.         14472
  207.         1440
  208.         0
  209.         1
  210.         0
  211.         1
  212.         1
  213.         0
  214.         1
  215.         1440
  216.         10800
  217.         0
  218.     [txt]
  219. >
  220. [elay]
  221. [l1]
  222.     0
  223. [pg]
  224.     3
  225.     44 0 26 0 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  226.     89 0 55 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  227.     98 0 10 1025 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  228. [edoc]
  229. <:#568,9360>' This macro will read dbase file header info and return the name and nubmer of fields.  It is also '  capable of returning any info stored in header. ie, field defin. field length, # records Etc
  230.  
  231. <:#284,9360>
  232.  
  233. <:#284,9360>Function Multiple()
  234.  
  235. <:#284,9360>dim a(40)
  236.  
  237. <:#284,9360>doc=getdocpath$()
  238.  
  239. <:#284,9360>Filledit(9001,"{doc}*.dbf")
  240.  
  241. <:#284,9360>Box=dialogbox(".","import")
  242.  
  243. <:#284,9360>if Box<<<;>1
  244.  
  245. <:#284,9360>    Exit Function
  246.  
  247. <:#284,9360>Endif
  248.  
  249. <:#284,9360>Files=getdialogfield$(9001)
  250.  
  251. <:#284,9360>Hourglass(on)
  252.  
  253. <:#284,9360>StatusBarMsg("Please Wait...Reading dBase file info ......")
  254.  
  255. <:#284,9360>dir=getcurrentdir$()
  256.  
  257. <:#284,9360>'Singlestep(on)
  258.  
  259. <:#284,9360>Handle=Fopen("{dir}{files}","r")
  260.  
  261. <:#284,9360>for t=1 to 32
  262.  
  263. <:#284,9360>    Byte=Fread(handle,1)
  264.  
  265. <:#284,9360>    char=asc(byte)
  266.  
  267. <:#284,9360>    a(t)="{char}"
  268.  
  269. <:#284,9360>next
  270.  
  271. <:#284,9360>Day=a(4)
  272.  
  273. <:#284,9360>Month=a(3)
  274.  
  275. <:#284,9360>Year=a(2)
  276.  
  277. <:#284,9360>Records=a(5)+(256*a(6))       
  278.  
  279. <:#284,9360>Bytes_Header=a(9)+(256*a(10)) 
  280.  
  281. <:#284,9360>Bytes_record=a(11)+(256*a(12))
  282.  
  283. <:#284,9360>Num_Fields = ((Bytes_Header - 32) / 32)
  284.  
  285. <:#284,9360>
  286.  
  287. <:#284,9360>Num_Fields=FormatNum$("","",0,Num_Fields)
  288.  
  289. <:#284,9360>Dim Name_Field(Num_fields)
  290.  
  291. <:#284,9360>Dim Combine(Num_Fields)
  292.  
  293. <:#284,9360>Filledit(1001,"{Files}")
  294.  
  295. <:#284,9360>Filledit(1003,"{Month}/{Day}/{Year}")
  296.  
  297. <:#284,9360>Filledit(1005,Records)
  298.  
  299. <:#284,9360>Filledit(1006,"{Num_Fields} Fields")
  300.  
  301. <:#284,9360>FOR V = 1 TO Num_Fields
  302.  
  303. <:#284,9360>    Name_field(v)= FREAD(Handle,11)
  304.  
  305. <:#284,9360>     charType = FREAD(Handle,1)
  306.  
  307. <:#284,9360>     fda = FREAD(Handle,4)
  308.  
  309. <:#284,9360>     length = ASC(FREAD(Handle,1))
  310.  
  311. <:#284,9360>     numdec = ASC(FREAD(Handle,1))
  312.  
  313. <:#284,9360>    reserve = FREAD(Handle,13)
  314.  
  315. <:#284,9360>    odhterm = FREAD(Handle,1)
  316.  
  317. <:#284,9360>    Filledit(9000,Name_Field(v))
  318.  
  319. <:#284,9360>    Combine(v)="{Name_Field(v)}^{CharType}^{Length}" 
  320.  
  321. <:#284,9360>name=Name_Field(v)
  322.  
  323. <:#284,9360>View=combine(v)
  324.  
  325. <:#284,9360>'Message("{v} {name} {View}")
  326.  
  327. <:#284,9360>NEXT
  328.  
  329. <:#284,9360>Hourglass(off)
  330.  
  331. <:#284,9360>Fclose(Handle)
  332.  
  333. <:#284,9360>StatusBarMsg("")
  334.  
  335. <:#284,9360>Box=dialogbox(".","Dbasefun")
  336.  
  337. <:#284,9360>If Box=3
  338.  
  339. <:#284,9360>    New("_default.sty",Nocontents,0)
  340.  
  341. <:#284,9360>    Type ("dBase<[>Enter]")
  342.  
  343. <:#284,9360>    for F=1 to Num_fields
  344.  
  345. <:#284,9360>        Name=Name_Field(F)
  346.  
  347. <:#284,9360>    Type ("{Name}<[>Enter]")
  348.  
  349. <:#284,9360>    Next
  350.  
  351. <:#284,9360>Endif
  352.  
  353. <:#284,9360>l1="Here is a dBase description file.  To use this in a merge, "
  354.  
  355. <:#284,9360>l2="save the untitled as a file. For additional help, see the Ami "
  356.  
  357. <:#284,9360>l3="Pro chapter on Merging Text and Data."
  358.  
  359. <:#284,9360>Message("{l1}{l2}{l3}") 
  360.  
  361. <:#284,9360>
  362.  
  363. <:#284,9360>END FUNCTION
  364.  
  365. <:#284,9360>
  366.  
  367. <:#284,9360>
  368.  
  369. <:#284,9360>DIALOG Import
  370.  
  371. <:#284,9360>-2134376448 5 94 40 128 90 "" "" "Read dBase File"
  372.  
  373. <:#284,9360>FONT 6 "HELV"
  374.  
  375. <:#284,9360>6 28 64 56 9001 1352728579 "listbox" "" 0 
  376.  
  377. <:#284,9360>6 16 40 10 1000 1342308352 "static" "dBase files:" 0 
  378.  
  379. <:#284,9360>8 4 60 10 7999 1342177280 "static" "" 0 
  380.  
  381. <:#284,9360>82 4 40 14 1 1342373889 "button" "OK" 0 
  382.  
  383. <:#284,9360>82 20 40 14 2 1342373888 "button" "Cancel" 0 
  384.  
  385. <:#284,9360>END DIALOG
  386.  
  387. <:#284,9360>
  388.  
  389. <:#284,9360>
  390.  
  391. <:#284,9360>DIALOG Dbasefun
  392.  
  393. <:#284,9360>-2134376448 13 76 42 162 122 "" "" "dBase File Info"
  394.  
  395. <:#284,9360>FONT 12 "System"
  396.  
  397. <:#284,9360>8 6 46 10 1000 1342177280 "static" "dBase file:" 0 
  398.  
  399. <:#284,9360>60 6 50 10 1001 1342177280 "static" " " 0 
  400.  
  401. <:#284,9360>8 18 46 10 1002 1342177280 "static" "Last edited:" 0 
  402.  
  403. <:#284,9360>60 18 50 10 1003 1342177280 "static" " " 0 
  404.  
  405. <:#284,9360>8 30 50 10 1004 1342177280 "static" "Total records:" 0 
  406.  
  407. <:#284,9360>60 30 50 10 1005 1342177280 "static" " " 0 
  408.  
  409. <:#284,9360>60 42 50 10 1006 1342177280 "static" "" 0 
  410.  
  411. <:#284,9360>58 54 96 48 9000 1352663041 "listbox" "" 0 
  412.  
  413. <:#284,9360>8 42 50 10 1007 1342177280 "static" "Num. of fields:" 0 
  414.  
  415. <:#284,9360>8 54 48 10 1008 1342177280 "static" "Field names:" 0 
  416.  
  417. <:#284,9360>6 104 80 14 3 1342373888 "button" "Create Description File" 0 
  418.  
  419. <:#284,9360>114 4 40 14 1 1342373889 "button" "OK" 0 
  420.  
  421. <:#284,9360>114 20 40 14 2 1342373888 "button" "Cancel" 0 
  422.  
  423. <:#284,9360>END DIALOG
  424.  
  425. >
  426.  
  427. [Embedded]
  428. 00006203
  429. >
  430. [macsum] 3
  431. Multiple 0 0 33 2
  432. Import 1718 0 -1 70
  433. Dbasefun 2032 0 -1 81
  434. [macse]
  435. 14 Multiple
  436. 5 40
  437. 21 1 [X]
  438. 0 268
  439. 13
  440. 8 2
  441. 0 31 9001 "{2}*.dbf"
  442. 0 26 "." "import"
  443. 13
  444. 8 3
  445. 6 3
  446. 5 1
  447. 18 1
  448. 11 00000136
  449. 6 0
  450. 15
  451. 9
  452. 0 27 9001
  453. 13
  454. 8 4
  455. 0 296 1
  456. 0 789 "Please Wait...Reading dBase file info ......"
  457. 0 290
  458. 13
  459. 8 5
  460. 0 259 "{5}{4}" "r"
  461. 13
  462. 8 6
  463. 5 1
  464. 8 7
  465. 5 32
  466. 6 7
  467. 18 2
  468. 12 00000350
  469. 10 00000428
  470. 5 1
  471. 6 7
  472. 3 0
  473. 8 7
  474. 10 00000274
  475. 0 782 "{6}" 1
  476. 13
  477. 8 8
  478. 0 40 "{8}"
  479. 13
  480. 8 9
  481. 6 7
  482. 7 "{9}"
  483. 23 1
  484. 10 00000317
  485. 5 4
  486. 22 1
  487. 8 10
  488. 5 3
  489. 22 1
  490. 8 11
  491. 5 2
  492. 22 1
  493. 8 12
  494. 5 5
  495. 22 1
  496. 5 256
  497. 5 6
  498. 22 1
  499. 4 0
  500. 3 0
  501. 8 13
  502. 5 9
  503. 22 1
  504. 5 256
  505. 5 10
  506. 22 1
  507. 4 0
  508. 3 0
  509. 8 14
  510. 5 11
  511. 22 1
  512. 5 256
  513. 5 12
  514. 22 1
  515. 4 0
  516. 3 0
  517. 8 15
  518. 6 14
  519. 5 32
  520. 3 1
  521. 5 32
  522. 4 1
  523. 8 16
  524. 0 19 "" "" 0 "{16}"
  525. 13
  526. 8 16
  527. 6 16
  528. 21 17 [X]
  529. 6 16
  530. 21 18 [X]
  531. 0 31 1001 "{4}"
  532. 0 31 1003 "{11}/{10}/{12}"
  533. 0 31 1005 "{13}"
  534. 0 31 1006 "{16} Fields"
  535. 5 1
  536. 8 19
  537. 6 16
  538. 6 19
  539. 18 2
  540. 12 00000894
  541. 10 00001218
  542. 5 1
  543. 6 19
  544. 3 0
  545. 8 19
  546. 10 00000815
  547. 6 19
  548. 0 782 "{6}" 11
  549. 13
  550. 23 17
  551. 0 782 "{6}" 1
  552. 13
  553. 8 20
  554. 0 782 "{6}" 4
  555. 13
  556. 8 21
  557. 0 782 "{6}" 1
  558. 13
  559. 0 40 [X]
  560. 13
  561. 8 22
  562. 0 782 "{6}" 1
  563. 13
  564. 0 40 [X]
  565. 13
  566. 8 23
  567. 0 782 "{6}" 13
  568. 13
  569. 8 24
  570. 0 782 "{6}" 1
  571. 13
  572. 8 25
  573. 6 19
  574. 22 17
  575. 0 31 9000 [X]
  576. 6 19
  577. 7 "{26}^{20}^{22}"
  578. 23 18
  579. 6 19
  580. 22 17
  581. 8 27
  582. 6 19
  583. 22 18
  584. 8 28
  585. 10 00000859
  586. 0 296 0
  587. 0 260 "{6}"
  588. 0 789 ""
  589. 0 26 "." "Dbasefun"
  590. 13
  591. 8 3
  592. 6 3
  593. 5 3
  594. 18 0
  595. 11 00001492
  596. 2 101 1 "_default.sty" 0 0
  597. 0 6 "dBase[13]"
  598. 5 1
  599. 8 29
  600. 6 16
  601. 6 29
  602. 18 2
  603. 12 00001444
  604. 10 00001492
  605. 5 1
  606. 6 29
  607. 3 0
  608. 8 29
  609. 10 00001365
  610. 6 29
  611. 22 17
  612. 8 27
  613. 0 6 "{27}[13]"
  614. 10 00001409
  615. 7 "Here is a dBase description file.  To use this in a merge, "
  616. 8 30
  617. 7 "save the untitled as a file. For additional help, see the Ami "
  618. 8 31
  619. 7 "Pro chapter on Merging Text and Data."
  620. 8 32
  621. 0 3 "{30}{31}{32}"
  622. 6 0
  623. 15
  624. 9
  625. DIALOG Import
  626. -2134376448 5 94 40 128 90 "" "" "Read dBase File" 
  627. FONT 6 "HELV" 
  628. 6 28 64 56 9001 1352728579 "listbox" "" 0 
  629. 6 16 40 10 1000 1342308352 "static" "dBase files:" 0 
  630. 8 4 60 10 7999 1342177280 "static" "" 0 
  631. 82 4 40 14 1 1342373889 "button" "OK" 0 
  632. 82 20 40 14 2 1342373888 "button" "Cancel" 0 
  633. DIALOG Dbasefun
  634. -2134376448 13 76 42 162 122 "" "" "dBase File Info" 
  635. FONT 12 "System" 
  636. 8 6 46 10 1000 1342177280 "static" "dBase file:" 0 
  637. 60 6 50 10 1001 1342177280 "static" " " 0 
  638. 8 18 46 10 1002 1342177280 "static" "Last edited:" 0 
  639. 60 18 50 10 1003 1342177280 "static" " " 0 
  640. 8 30 50 10 1004 1342177280 "static" "Total records:" 0 
  641. 60 30 50 10 1005 1342177280 "static" " " 0 
  642. 60 42 50 10 1006 1342177280 "static" "" 0 
  643. 58 54 96 48 9000 1352663041 "listbox" "" 0 
  644. 8 42 50 10 1007 1342177280 "static" "Num. of fields:" 0 
  645. 8 54 48 10 1008 1342177280 "static" "Field names:" 0 
  646. 6 104 80 14 3 1342373888 "button" "Create Description File" 0 
  647. 114 4 40 14 1 1342373889 "button" "OK" 0 
  648. 114 20 40 14 2 1342373888 "button" "Cancel" 0 
  649. 00006228
  650.