Hello everyone!
I have wrote out the logic that I am using to write my script, I am wondering if it makes sence and if it does or does not get some advice on inproving it
The goal of this is to be able to get some files (zip file) from a website (IRS.GOV) the files contain eo1 through eo6 xxx.lst is the file names these file are fixed width file, once they are downloaded and unzipped then they need to be uploaded to the database (db name irs_rawdata) at that point they then need to be filted to either go to a guery or be put in to a blocklist as they don't match the needed info
at that point its a different script to handle viewing, editing, putting it in the block list or allowed list as a human finishes the job not the computer
logic below:
if date not = last download
grab files from irs or die (can not get files)
unzip files or die (was unable to unzip the files)
connect to mysql server or die(was unable to connect to server)
select db or die(was unable to select the database)
if table not exist
create
else
upload data to db table irs_rawdata or die(was unable to upload data to table)
get num of rows affected
loop
if num not = rows affected
get record from irs_rawdata or die(was unable to get record)
if not exist in block
if not exist in allow
if match allowed critiar AND not match block critiar
add to irs_query (full data)
else
add to block (ein only)
else
update full data in irs_query
else
go to next record
loop again
else
filtering of the data is finished
else
There are no new files to get!