This is a common problem and one that you really need to prepare for. Offer the service up and your users are going to love it. As it happens when you “go-live” you generally change your SVM datasource, which means the F986110 and F986114 etc are going to be missing their old records. For example, I’ve just done a 910 to 920 go-live, now my users in 920 cannot see their old PDF’s and csv’s.
Right, so what can I do.
A quick squizz at the old printqueue (/E910SYS/PRINTQUEUE) (yeah, IFS = AS/400) tells me that there are only 750000 PDFs… What! plus the logs and the csv’s and more. No way, about 1000000 files. No wonder it was hard to browse the IFS.
Okay, I don’t want to move the million files, selective mv’s get’s errors in STRQSH, man that is the crappiest interface EVER!!! It’s like the worlds worst beta ever.
Sure I like being able to run unix commands on the green screen – but that interface!!! wow, crap. Does anyone know if I can ssh to the box without a 5250?
honestly, it’s sooooo terrible.
you never know if a command has hung or whether it’s complete.
Anyway, stop complaining…
So, there are too many files to run any commands – cannot use find with exec, but the interface is so bad, it makes everything worse.
> ls /E910SYS/*
qsh: 001-0085 Too many arguments specified on command.
0
$
I get the above no matter what I try (after 5 minutes of course)
I finally decide to go rouge on this problem.
I run the following SQL:
--this is slightly unrelated, but I copy over all of the records from svm910 so that I can see them in WSJ for retrieval. Nice, now I just need to put the files where JDE expects. Note that I’m still using the filesystem for my PrintQueue.
insert into svm920.f986110 (select * from svm910.f986110) ;
--I now build the mv commands and pop them into a .sh file for execution through STRQSH:
select 'mv /E910SYS/PRINTQUEUE/' || trim(JCFNDFUF2) || '_' || JCJOBNBR || '_PDF.pdf /E920SYS/PRINTQUEUE'
from svm920.f986110 where jcsbmdate > 117070 and jcenhv like '%910%';
This generates a pile of these (50K), I’ll do a couple of days at a time!
mv /E910SYS/PRINTQUEUE/R5642005_SIM001_13368050_PDF.pdf /E920SYS/PRINTQUEUE
mv /E910SYS/PRINTQUEUE/R5747011_SIM001_13368051_PDF.pdf /E920SYS/PRINTQUEUE
mv /E910SYS/PRINTQUEUE/R5543500_SIM002_13368052_PDF.pdf /E920SYS/PRINTQUEUE
mv /E910SYS/PRINTQUEUE/R5641004_SIM901_13368053_PDF.pdf /E920SYS/PRINTQUEUE
mv /E910SYS/PRINTQUEUE/R5642023_SIM902_13368054_PDF.pdf /E920SYS/PRINTQUEUE
mv /E910SYS/PRINTQUEUE/R5531410_TOP008_13368055_PDF.pdf /E920SYS/PRINTQUEUE
Once I have my 50000 lines, I create a copyPDF.sh in a small IFS dir and paste in the contents of the above.
I then chmod 755 this file and run it through STRQSH.
Bosch! I have 50000 PDF’s copied over to the E920 location so that my users can see their historical data.
No comments:
Post a Comment