djTechZombie
Programmer
I am working on updating some old prg files to process a particular client's data. As the job has grown more complex over the years, I have had to manually edit the files for each job to update things such as version number (job 123456 v01, v02, etc) and whether or not certain prgs were run. I've decided to create a Form and include updated versions of each of the programs, and (almost) everything is working great.
The problem I am having is that every 1 out of 20 or so jobs needs to be coded to split by version based on a field in the data. I have been manually adding a REPLACE ALL command at the bottom of the prg to accomplish this. I am trying to figure out a way that I can import an external file containing the criteria.
My thought was to use an array and load a csv file with the Code and Ver, but I have been having issues getting it to work.
I've been having to use C# knowledge combined with VFP help files and internet resources to give myself a crash course in vfp9 (I've been using VFP for 8 years or so, but never programmed anything more than "REPLACE ALL FIELD1 WITH FIELD2 FOR FIELD1 = ' '"
Any ideas? Am I even on the right track?
I need to be able to update the matching criteria on a job by job basis, so a creating a compiled prg isn't feasible. I would like a stand-alone exe file that other programmers can use while I am out of the office.
Thanks
**********************************************************
DECLARE aSplit [50,2]
CLOSE DATABASES
CLEAR
CREATE CURSOR cSplit;
(CellCode C(5), Ver C(3))
select cSplit
append from VerSplit.txt type csv &&Comma delimited file containing criteria
COPY TO ARRAY aSplit
USE Laser && DBF file being manipulated
nSplit = ALEN(aSplit, 1)
FOR nCount = 1 to nSplit
ENDFOR
************************************************************************************
The problem I am having is that every 1 out of 20 or so jobs needs to be coded to split by version based on a field in the data. I have been manually adding a REPLACE ALL command at the bottom of the prg to accomplish this. I am trying to figure out a way that I can import an external file containing the criteria.
My thought was to use an array and load a csv file with the Code and Ver, but I have been having issues getting it to work.
I've been having to use C# knowledge combined with VFP help files and internet resources to give myself a crash course in vfp9 (I've been using VFP for 8 years or so, but never programmed anything more than "REPLACE ALL FIELD1 WITH FIELD2 FOR FIELD1 = ' '"
Any ideas? Am I even on the right track?
I need to be able to update the matching criteria on a job by job basis, so a creating a compiled prg isn't feasible. I would like a stand-alone exe file that other programmers can use while I am out of the office.
Thanks
**********************************************************
DECLARE aSplit [50,2]
CLOSE DATABASES
CLEAR
CREATE CURSOR cSplit;
(CellCode C(5), Ver C(3))
select cSplit
append from VerSplit.txt type csv &&Comma delimited file containing criteria
COPY TO ARRAY aSplit
USE Laser && DBF file being manipulated
nSplit = ALEN(aSplit, 1)
FOR nCount = 1 to nSplit
REPLACE ALL FILLER11 WITH aSplit[1,2] FOR LETTER_CD = aSplit[1,1]ENDFOR
************************************************************************************