Subject Which dBase is best for me...maybe dbDOS
From Merci <msantiago@ereceivables.co>
Date Fri, 17 Oct 2014 13:30:06 -0400
Newsgroups dbase.getting-started

A little background on me...
My company started using Foxbase when we were on Unix. When we converted to windows we started using Visual Foxpro, but still programing in original Foxbase format.  In other words not using or know how to use the visual part of the program.  Now We're updating to Windows 7 which foxpro isn't working very well on.

I downloaded the 30 day trial of dBase 9 and am pretty lost in it.  I'm able to see my table & open the *.prg, but can't run them and indexes aren't responding either.  I'm wondering if dbDOS/pro is better for me.  There isn't a trial version to review & I'm kind of afraid to buy it.

Below are pieces of a few programs that I write in Foxpro....Maybe someone who uses dbDOS might know if it's the right fit before I buy it.  Thanks
Signed
Lost in DB world A.K.A Merci


SELECT 1
USE h:\nyh_nb\new_nyh\raw837
ZAP

loc=' '
@ 5,10 say 'Location (E)ast or (W)est:' GET loc PICTURE 'X'
read

*SET TALK ON
*SET STEP ON
IF UPPER(loc)='E'
   STORE FOPEN("h:\nyh_nb\new_nyh\east\enyh_837.txt") TO raw837    
ELSE
   STORE FOPEN("h:\nyh_nb\new_nyh\west\wnyh_837.txt") TO raw837    
ENDIF
fl_size=FSEEK(raw837, 0, 2)  && Move pointer to EOF
fl_beg=FSEEK(raw837, 0)   && Move pointer to BOF
   fstr = Fread(raw837,fl_size)  && Store contents
   fstr=alltrim(fstr)
   SELECT 1
   DO WHILE .T. .or. !EOF()
      strlen=LEN(fstr)
      IF strlen=0
         EXIT
      endif
      fndamb=AT('~',fstr)
      APPEND BLANK
      replace raw1 WITH ALLTRIM(SUBSTR(fstr,1,fndamb-1))
      fstr=ALLTRIM(SUBSTR(fstr,fndamb+1,strlen-fndamb))
   ENDDO
= FCLOSE(raw837)  && Close the file

SELECT 1
COPY TO h:\nyh_nb\new_nyh\raw837.txt TYPE sdf














SET ECHO OFF
SET TALK off


loc=' '
BT=DATE()
site='  '
@ 5,10 say 'BATCH DATE:' GET BT PICTURE '99/99/9999'
@ 6,10 say 'Location (E)ast or(W)est:' GET loc PICTURE 'X'
@ 7,10 say 'PROP(R9),PR8Z(R8),NYOP(N9),NY8Z(N8),QNOP(Q9),QN8Z(Q8),MTOP(M9),NYDT(L9)'
@ 8,10 SAY 'MT8Z(M8),BROP(B9),BR8Z(B8),WCOP(W9),WC8Z(W8),PWOP(P9),PW8Z(P8):' GET site picture 'XX'
READ




IF UPPER(loc)='E'
   SELECT 1
   USE h:\nyh_nb\new_nyh\east\e837_con
   SELECT 2
   USE h:\nyh_nb\new_nyh\east\east_hl7
   SET FILTER TO ALLTRIM(f1)='IN1' .or. ALLTRIM(f1)='ZEG'
   SELECT 3
   USE h:\nyh_nb\new_nyh\east\east_arf
   INDEX ON ALLTRIM(pt_refno) TAG acct
   SELECT 4
   USE h:\nyh_nb\new_nyh\east\e_recon
   INDEX ON ALLTRIM(pt_refno) TAG acct
   set printer to "h:\nyh_nb\new_nyh\east\enyh_cfo_"+ALLTRIM(UPPER(site))+".csv"
   set device to print
   set print on
ELSE
   SELECT 1
   USE h:\nyh_nb\new_nyh\west\w837_con
   SELECT 2
   USE h:\nyh_nb\new_nyh\west\west_hl7
   SET FILTER TO ALLTRIM(f1)='IN1' .or. ALLTRIM(f1)='ZEG'
   SELECT 3
   USE h:\nyh_nb\new_nyh\west\west_arf
   INDEX ON ALLTRIM(pt_refno) TAG acct
   SELECT 4
   USE h:\nyh_nb\new_nyh\west\w_recon
   INDEX ON ALLTRIM(pt_refno) TAG acct
   set printer to "h:\nyh_nb\new_nyh\west\wnyh_cfo_"+ALLTRIM(UPPER(site))+".csv"
   set device to print
   set print on
ENDIF


DO WHILE LNCNT<>0
            lcnt=lcnt+1
            a='lin_no'+ALLTRIM(STR(lcnt,2))
            b='revcd'+ALLTRIM(STR(lcnt,2))
            c='cpt'+ALLTRIM(STR(lcnt,2))
            d='mod1_'+ALLTRIM(STR(lcnt,2))
            e='mod2_'+ALLTRIM(STR(lcnt,2))
            f='mod3_'+ALLTRIM(STR(lcnt,2))
            g='mod4_'+ALLTRIM(STR(lcnt,2))
            h='chg'+ALLTRIM(STR(lcnt,2))
            i='unit'+ALLTRIM(STR(lcnt,2))
            j='dos'+ALLTRIM(STR(lcnt,2))
            
            IF EMPTY(&j)
               IF EMPTY(&c)
                  IF ALLTRIM(dx1)=''
                     ?'CHG:'+fdt+','+tdt+','+&b+':'+&b+',,'+&h+',,'+&d+',,,,,,,,'+&i+','+pri_dx+',,'+dx1+',,'+dx2+',,'+dx3+','
                  ELSE
                     ?'CHG:'+fdt+','+tdt+','+&b+':'+&b+',,'+&h+',,'+&d+',,,,,,,,'+&i+','+dx1+',,'+dx2+',,'+dx3+',,'+dx4+','
                  ENDIF
               ELSE
                  IF ALLTRIM(dx1)=''
                     ?'CHG:'+fdt+','+tdt+','+&c+':'+&b+',,'+&h+',,'+&d+',,,,,,,,'+&i+','+pri_dx+',,'+dx1+',,'+dx2+',,'+dx3+','
                  ELSE                
                     ?'CHG:'+fdt+','+tdt+','+&c+':'+&b+',,'+&h+',,'+&d+',,,,,,,,'+&i+','+dx1+',,'+dx2+',,'+dx3+',,'+dx4+','
                  ENDIF
               ENDIF
            ELSE
               IF EMPTY(&c)
                  IF ALLTRIM(dx1)=''
                     ?'CHG:'+&j+','+&j+','+&b+':'+&b+',,'+&h+',,'+&d+',,,,,,,,'+&i+','+pri_dx+',,'+dx1+',,'+dx2+',,'+dx3+','
                  ELSE
                     ?'CHG:'+&j+','+&j+','+&b+':'+&b+',,'+&h+',,'+&d+',,,,,,,,'+&i+','+dx1+',,'+dx2+',,'+dx3+',,'+dx4+','
                  ENDIF
               ELSE
                  IF ALLTRIM(dx1)=''
                     ?'CHG:'+&j+','+&j+','+&c+':'+&b+',,'+&h+',,'+&d+',,,,,,,,'+&i+','+pri_dx+',,'+dx1+',,'+dx2+',,'+dx3+','
                  ELSE
                     ?'CHG:'+&j+','+&j+','+&c+':'+&b+',,'+&h+',,'+&d+',,,,,,,,'+&i+','+dx1+',,'+dx2+',,'+dx3+',,'+dx4+','
                  ENDIF
               ENDIF
            ENDIF
            lncnt=lncnt-1
         ENDDO