Fw: [!! SPAM] Qualifiers

Del del at altsystem.com
Fri Dec 4 10:59:28 PST 2009


I hesitate to answer this because my solution is so hokey.
But it works great, and I have been using it for years.
My system is based on multiple qualifiers.
Since I have hundreds of individual files, it is impossible to create them
manually.
Basically, we use qualifiers to create new companies.
Some of my clients run many companies with many sets of books, inventory,
etc.
This solution will only work on SCO Unix, as far as I know (maybe other
flavors of Unix, but not Windows).
I have a copy of an old Microsoft Basic package that I used to write a
program to create a new qualifier in all files in the system. (Also wrote
one to delete a qualifier).  I am more familiar with basic than with Unix
scripting, so I have written a number of my utility pgms in Basic.
I don't let end users run this.  When they want a new company, they call and
ask me to create it.
The most important part of the strategy is that I have reserved the
unqualified file for new qualifier creation only.  The unqualified files are
loaded with the initial values that you would want to have when you start up
a new company.  Mostly, this means they are empty, but some have initial
startup values (like a chart of accounts, for instance).
You have to position yourself in the "filepro" directory where the files are
and run the basic program.
It asks for the new qualifier code (we call it the company code, four
characters long).
Once you enter and verify it, the program uses "ls" to create a list of all
files in the system.
Then it uses the file list to copy the unqualified file to the new
qualifier.
When finished, you have an exact copy of the unqualified files in the new
qualifier.
The program finishes by running a unix script to set file permissions on the
the qualifier files.
Users can start using the new qualifier immediately to customize the data.
The basic program is very simple, and I am including a copy at the end of
this email (after Nancy's email).
If anybody wants the program and a copy of the mbasic interpreter, I will
send it free of charge via email attachment.

Del Neroni


----- Original Message ----- 
From: "Nancy Palmquist" <nlp at vss3.com>
To: <frank7767 at aol.com>
Cc: <filepro-list at celestial.com>
Sent: Friday, December 04, 2009 10:02 AM
Subject: Re: [!! SPAM] Qualifiers


> frank7767 at aol.com wrote:
>>  I am in adding 5 qualifiers to an existing Filepro system....The
>> process of adding them is very tedious.
>> is there a way to add these qualifiers to all the filepro files via a
>> script or any other way?
>>
>> Regards
>> Frank Gemeinhardt
>>
>>
>>
>>
> Frank,
>
> I was writing a confirmation of the other methods and I had a
> revelation.  Hope this helps.
>
> If you make one file with the key files and the data files you need, you
> can copy those to every file - since they are all zero length, you just
> need the names in each file.  In windows you would just paste the same
> set of key??? and data??? into each file.  In Unix, (I just open the
> folders from my windows side with samba and do the same thing - but that
> might not work for you.  I don't have a great tool but maybe your Unix
> has a GUI side also.)
>
> Then use the Rebuild all Indexes script filepro will make for you for
> rebuilding all your indexes.  All current versions of filepro have one.
> You can edit the script so you just leave the files you are making. Just
> run it once for each qualifer to build the indexes.  PFQUAL=xxx;export
> PFQUAL or set PFQUAL=xxx in the environment will cause all the indexes
> to be run with that qualifier.
>
> And you got it.  Now if you need some key files to be loaded with data
> from another qualifier, just do that before the indexes and you got it
> without too much trouble.
>
>
>
>
> -- 
> Nancy Palmquist MOS & filePro Training Available
> Virtual Software Systems Web Based Training and Consulting
> PHONE: (412) 835-9417    Web site:  http://www.vss3.com
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
10 GOTO 30

20 SAVE "tools/makequal.bas",A:STOP

30 REM

40 PRINT "CREATE NEW COMPANY"

45 PRINT:PRINT "This program will create a new company."

46 PRINT " Once created, a new company can be removed only with difficulty."

47 PRINT " Do you wish to continue? (Answer 'Y' or 'N')"

48 INPUT A$

49 IF A$ <> "Y" AND A$ <> "y" THEN SYSTEM

60 INPUT "Enter new company code: ";QUAL$

65 IF LEN(QUAL$)<>4 THEN PRINT:PRINT "Invalid Company Code - Must be four
digits":PRINT "Please try again.":A$=INPUT$(1):GOTO 60

70 PRINT "New company code is "+QUAL$+": Is this correct?"

80 INPUT YESNO$

90 IF YESNO$ <> "Y" AND YESNO$ <> "y" AND YESNO$ <> "YES" AND YESNO$ <>
"yes" THEN END

92 REM check company code to see if already in use

93 OPEN"I",3,"stgcntrc/qualify"

94 IF EOF(3) THEN GOTO 100 ELSE LINE INPUT#3,A$

95 IF A$=QUAL$ THEN PRINT:PRINT "Company already on file; try again":PRINT
"Press any key to continue":A$=INPUT$(1):CLOSE:GOTO 30

96 GOTO 94

100 SHELL "ls */key >/tmp/list1"

101 SHELL "ls */data >/tmp/list2"

102 SHELL "ls */index.* >/tmp/list3"

104 SHELL "cat /tmp/list1 /tmp/list2 /tmp/list3 >/tmp/list"

110 'SHELL "more /tmp/list"

111 'XX$=INPUT$(1)

130 OPEN"I",1,"/tmp/list"

140 ON ERROR GOTO 210

150 IF EOF(1) THEN GOTO 500 ELSE LINE INPUT#1,A$

160 PRINT A$

170 X=INSTR(A$,"index")

180 IF X>0 THEN GOTO 300

185 X=INSTR(A$,"key")

186 IF X=0 THEN X=INSTR(A$,"data")

187 IF X=0 THEN PRINT "BAD Filename":STOP

190 SHELL "cp "+A$+" "+A$+QUAL$

195 PRINT "cp "+A$+" "+A$+QUAL$

196 'XX$=INPUT$(1)

200 GOTO 150

210 RESUME 150

300 'move index

310 X=INSTR(A$,"x.")

320 IF X=0 THEN PRINT "Bad Index";STOP

325 X=X+1

330 B$=MID$(A$,1,X-1)+QUAL$+MID$(A$,X,2)

350 SHELL "cp "+A$+" "+B$

355 PRINT "cp "+A$+" "+B$

356 'XX$=INPUT$(1)

360 RETURN

500 REM

600 REM

605 REM

650 RUN "tools/chown.bas"





More information about the Filepro-list mailing list