Link to home
Start Free TrialLog in
Avatar of amdj
amdjFlag for United States of America

asked on

Sage MAS200 print files

I hope there are Sage MAS200 expert out there!
Due to low disk space on the server, I deleted some of the prefer print files in &\home\textout directory but when I put them back they dont show up in program prefer print. Is there a utility to rescan and populate those pd???? files back into the system?
Thanks
 

Avatar of SageMas90_200guy
SageMas90_200guy
Flag of United States of America image

Do you mean Deferred Print??  
Avatar of amdj

ASKER

Yes and those are in \home\textout directory pd????? files
Avatar of rr_miles
rr_miles

Reinstall your Library Master module. It will only rplace the itmes you need.
Avatar of amdj

ASKER

Can you explain a little more detail?
Thanks
MAS90/200 will allow the reinstallation of the System/Library Master or any module after the system is installed and has been used for months. This is a common Sage support tactic. It will keep your data files intact, although it is recommended that you backup your data first. Any MD extensions will have to be reinstalled also. Before you begin, make sure you have your software keys. If they are lost, any Sage reseller can get them from Sage. After inserting the MAS90/200 CD, a module list is presented. In your case, only check the System and Library Master checkboxes. Sit back and wait for the install to complete. Should take about 5 minutes or less if the server is not in another location.
MAS90/200 will allow the reinstallation of the System/Library Master or any module after the system is installed and has been used for months. This is a common Sage support tactic. It will keep your data files intact, although it is recommended that you backup your data first. Any MD extensions will have to be reinstalled also. Before you begin, make sure you have your software keys. If they are lost, any Sage reseller can get them from Sage. After inserting the MAS90/200 CD, a module list is presented. In your case, only check the System and Library Master checkboxes. Sit back and wait for the install to complete. Should take about 5 minutes or less if the server is not in another location.
Avatar of amdj

ASKER

How does this reinstall fix my missing users pd*.* files? All I need is putting back those deleted pd*.* files into the system so users can view these reports in Deferred Print View. I have deleted these files and was put them back but they don't show up in the Deferred Print View in MAS200.
Thanks
The reinstall will only restore the MAS printer queues.  Assuming the queues are OK and all you need you do is put the physical report files back into the database, it is possible, although VERY difficult, to perform manually. Briefly, you use DFDM to manually add records the file, then fill in the fields. It is very tedious.  Following is the file and its layout;

 SY_Deferred                      Deferred Printing Master                      Level: 4.30  1/28/2008
                                                                             MAS_SYSTEM\SY_Deferred.M4T
 SQL Def: Y  SysDB: N  Bus Obj: N/A                                                         Mirror: N/A

 KPRIMARY: ModuleCode+UserLogon+CompanyCode+FileName
 KUSERLOGON: UserLogon+ModuleCode+CompanyCode+FileName

 Fld  Column Name                     M/L TUR  Description/Notes              Class

   1  ModuleCode. . . . . . . . . .     3 SYY  Module Code . . . . . . . . . .MODULECODE
   2  UserLogon . . . . . . . . . .    60 SNY  User Logon. . . . . . . . . . .USERLOGON
   3  CompanyCode . . . . . . . . .   3 SYY  Company Code. . . . . . . . . .COMPANYCODE
   4  FileName. . . . . . . . . . . . .   10 SNN  RPT File Name . . . . . . . . .
   5  Title . . . . . . . . . . . . . . . . .  48 SNN  Report Title. . . . . . . . . .
   6  DateCreated . . . . . . . . .     8 SNY  Date Created. . . . . . . . . .DATE
                                                Read Only:Y Notes: YYYYMMDD
   7  TimeCreated . . . . . . . . .    10 SNY  Time Created. . . . . . . . . .
                                                Read Only:Y
   8  PrinterName . . . . . . . . .   100 SNN  Printer Name. . . . . . . . . .
   9  Copies. . . . . . . . . . . .  . .     3.0  NNN  Number of Copies. . . . . . . .
  10  TotalPages. . . . . . . . . .      8.0  NNN  Total Pages . . . . . . . . . .
  11  PageFrom. . . . . . . . . . .     8.0  NNN  Page From . . . . . . . . . . .
  12  PageThru. . . . . . . . . . .      8.0  NNN  Page Through. . . . . . . . . .
  13  Collate . . . . . . . . . . .          1 SYN  Collate Pages . . . . . . . . .YESNO
                                                Valid:Y,N
  14  Secured . . . . . . . . . . .     1 SYN  Require Security. . . . . . . .YESNO
                                                Valid:Y,N
  15  PurgeAfterPrinting. . . . . .     1 SYN  Purge After Printing. . . . . .YESNO
                                                Valid:Y,N
  16  PurgeAfterPrintingOrigCopy. .     1 SYN  Purge After Printing Original CYESNO
                                                Valid:Y,N
  17  AuditRegister . . . . . . . .     1 SYN  Audit Register. . . . . . . . .YESNO
                                                Valid:Y,N



 
BTW: If your deffered files are in the proper location, all versions of MAS90/200 4.10 and above have an icon on the right side of the deffered listbox that will refresh the list from the directory. It looks like a "hollow circle" and has an arrow point rotating counterclockwise.
Avatar of amdj

ASKER

I don't see such an icon but on the list box there's refresh button but it does not work. there must be a way to rescan the directory.
How many files need to be put into the deferred file?
Avatar of amdj

ASKER

Around 1000 files
It is possible to write a ProvideX program to scan a folder for filenames, but and this is a BIG but (sorry no pun intended), the user, company and report title cant be recreated automatically. User and Company can be a default unless there are multiple companies in MAS90/200. So the question becomes; what goes in the Report Title field, so the user knows what to print or preview. That may be why Sage did not create a utility. Looking at a M4D file with a debugger, the info is embedded in it. The M4D file is not documented. The MAS90/200 reporting system is supposed to be based on Crystal Reports. Crystal will not load a M4D file directly (I tired a bit ago). The only thing to do is name the report something like RPT0001 and so on. This of course is meaningless to users.
The actual path to the deffered print directory is:

Mas90/home/deferred

Go into MAS200 and Print a report to deferred.   Then

Mas90/Home/Deferred:   Should be at the same level as TEXTOUT.
I am using version 4.3.

Place a few of the reports back in this folder and see if they appear.  

If you are on an older version, It may still work.  Let me know what version you are on.

LibraryMaster/Reports/InstalledModuleListing
Avatar of amdj

ASKER

OK, Will try first thing on Monday.
Thanks
Unfortunately the suggestion made by SageMas90 200 guy does not work in versions 4.10 and above. The database must have the records added to it and the program does not rebuild the listing itself. VI does not allow the import of the information. A custom ProvideX program is required to get the data into the file as I outlined above. If it is imperative you get the files back into the program, you will have to contact a Master Developer to write a program for you. You can get a list of MDs from your reseller.
Avatar of amdj

ASKER

Thanks for all the suggestions, if there is no easy way to do it, is there a program that I can read those pd???? reports? I mean an external program.
I use windows notepad to read those reports but there are too many print charaters and make the report hard to read.
Thanks
No. There was a way to do what you are asking in the old Report Master. The feature never made it to the Deferred Printer. I have looked in my book of utilities by Master Developers. I could not find a ready made utility.  

I have also looked in my developer documentation for any of the Business Objects that could be used. I found nothing. Having to look through the actual source code would be very time consuming.

A suggestion for the future. Have users switch to a PDF printer. This will allow you to archive the reports, and still allow later viewing and printing. This is what the deferred printer was supposed to accomplish. It is a legacy print driver from way back in the version 1.X days of MS-DOS blue screen MAS 90/200.
 
Still have not determined what version you are on.  Unless I missed it.

If it is 3.71 or earlier, try what I suggested.  If its 4.10 or above try it anyway.  I did and it worked.  
Avatar of amdj

ASKER

I am on 3..7.1, will try the sugguestions on Monday
thanks
Good Luck..

Let me know if I can be of further assistance.
Avatar of amdj

ASKER

SageMas90_200guy
There is no MAS90\Home\deferred directory only textout is there.
amdj:
..\home\deferred is a level 4.x folder structure and did not exist in 3.71.
Avatar of amdj

ASKER

So I guess I am out of luck for recover those print files... at least may be there's a dos utility to read those files instead of using MAS200 preview.  
At the bottom of the screen, middle to slightly left do you have a button that is labled "Refresh"?
Avatar of amdj

ASKER

Yes, I did click refresh a few times but it gives the same short list. I did not clear it first tho.
You should not need to assuming you put the files back into the same folder. I tried this in 4.x and it did not work either. Zip up 2 or 3 of the print files and send them to me at rr_miles@hotmail.com. I have found the location of the report name for level 4. If I can find the location for your version I will write a quick bit of ProvideX code and we'll see if we can get the print files into the deferred file. It appears to be in a fixed location in level 4 but I have never looked at level 3 files.
Avatar of amdj

ASKER

rr_miles, Do you think MAS200 keeping track of those pd???? in sys01def.soa file?
and here are files that in home\textout\ directory.
Thanks
dp6509.zip
My listing shows it as ..\soa\sy0def.soa
Avatar of amdj

ASKER

You are right it should be ...\soa\sy0def.soa
This is a PDF of the file dp6507 called "test Print". I brought it into my 3.71. Any thoughts?
Test-Print.pdf
Avatar of amdj

ASKER

rr miles,
How did you bring this file into 3.7.1?
Here is the detailed manual process for the print file. It is in PDF format with lots of screen shots. Repeat 1000 times.
HowTo-371.pdf
I have decoded the 3.71 deferred headers if you wound like to give it a try
Avatar of amdj

ASKER

OK, I will try...
Tried the steps you suggested above, but report just won't show up in Deferred print.
Attached is a ProvideX program to automate the process. It will scan the ..\home\textout folder for DP*. Files. It will not make any changes to your system at the moment. I want to make sure you have no errors first. The only item I cant restore is tell how many pages there are on the report. Report title, module, etc should be restored.

Unzip the program. Put it in the ..\soa folder. In MAS200, go to File, Run. Type in SYZCON and press the ENTER key. You should get a blue command screen. Type

run defer and press the ENTER KEY. The quotes are required.

You should see a lot of scrolling as the program analyses the ..\home\textout folder and files. Let me know the results, good or bad. This will not allow you to view the reports yet, it is only an analysis step. When this step is correct I will turn on the file write capability.

defer.zip
run "defer" The quotes were missing above
Avatar of amdj

ASKER

OK, Will update the result!
Thanks
Avatar of amdj

ASKER

OK, It ran and list a few files and then error #52: Program is password protected
OK, I will update shortly
Avatar of amdj

ASKER

These are the files that listed before the error
BRADPRO.xls
dp0001
dp0002
DP2OA.xls
dp4407
Should you filter out those not dp???? files?


 
Yes, I did not expect xls files that began with DP. There are also some T files that I ignore.
Here is a new analysis program. It will also display files that may already be in the deferred queue and will not replace them. Ignore the "writing record" message, it lies for now.
defer.zip
Avatar of amdj

ASKER

rr_miles,
It show some dp files with header information but stil get the error #52: Program is password protected

This will show the line error.
This will show the line error.
Avatar of amdj

ASKER

What do you want me to do next?
message did not attach file
message did not attach file
defer.zip
Again
Avatar of amdj

ASKER

Trying to copy and paste the error, but it doesn't work.
question, when -) this return does that mean it finish running?
Avatar of amdj

ASKER

how can I send the output to a file from SYCON?
Avatar of amdj

ASKER

Here's the error!

0840 LET CH=MSK("123456789ABCDEF",CHR(ASC(CH$(1,1))))*16
Error #43: Format mask invalid

1) The prompt means the program has ended. Since there was an error the process was incomplete.

2) Please zip and send the last file displayed.
Avatar of amdj

ASKER

Is there an output file?
There is no output file. I would like the DP#### file.
Avatar of amdj

ASKER

These are the three files listed, but dp6519 is not in \home\textout directory. dp4407 is the last file when errored.
dpfiles.zip
The file causing an error was an "Inventory Count Worksheet" from January 2007. Attached is an update.
defer.zip
Avatar of amdj

ASKER

Thanks, will try again!
Avatar of amdj

ASKER

rr_miles
After the program for awhile and stop with this error. it seems there a bad dp file?

Error #27: unexpected or incorrect WEND, RETURN or NEXT
Program: Defer Line:0460

The last file listed on the console is dp6078
dp6078.zip
Avatar of amdj

ASKER

I think it went thru. half of those files.
I will have a look
try this one.
defer.zip
Avatar of amdj

ASKER

Got a same error and last listed dp6078
screen-shot.doc
Every time you have gotten an error and sent me the file, I can duplicate the error. At first I got the error on DP6078. It passes on my system now. I am assuming you are using the newest version of defer with a time stamp of 7/20/2009 8:56 am and using File/Run. Try exiting MAS90. Navigate to the ..\home folder. Select Pvxwin32.exe. Press Enter to the dialogue box. At the prompt type;

Run "..\soa\defer"

You may also copy the defer program into the ..\home folder and just type run "defer".
Avatar of amdj

ASKER

I did copy the defer program to \Mas90\soa and have the same datetime stamp 7/20/2009 8:56am
but let me run Pvxwin32.exe as you suggested.
Avatar of amdj

ASKER

Here you go...

I appreciate you help!
screen-shot.doc
I have cleaned up a few things. Makes no difference for me, but maybe will for you.
defer.zip
Avatar of amdj

ASKER

rr_mailes,
It stopped at the same place, do you think may be the next dp files is bad? I have uploaded the next dp file. At the console it stop at dp6078

Thanks
dp6077.zip
I wonder what would happen if you rename the file from dp6078 to _dp6078. It will be skipped of course. I will look at the latest file you sent.
Avatar of amdj

ASKER

Yeah. Let rename the file see what happen. Will do first thing in the morning.
Thanks
Avatar of amdj

ASKER

rr_miles,
rename those files will skip the scan, but here's the list of renamed pd files, may there's a common error in these file that you can fix in the program.
Thanks
dpfiles.zip
Avatar of amdj

ASKER

May be have the program skip those trouble files?
I think I found the problem. Files are OK. Stack overflow due to number of files. Maybe Wednesday before I can have a fix.I will use these files for test processing.
Avatar of amdj

ASKER

Thanks and appreciated!

OK, here it is.
defer.zip
Avatar of amdj

ASKER

Looks like it is running without stopping, will this version update the data file?
Avatar of amdj

ASKER

It's done! what next?
Excellent! Time to turn on file writing. Have a look at the ..\soa\sy0def.soa file. The first record will have just a number. That number is the next one assigned to create a DP#### filename. We want to make sure it is higher than any of the files already assigned. In the mean time, backup that file and I will set the program to write.
Avatar of amdj

ASKER

OK, I backed up the sy0def.soa and the next dp number is the highest number among those in \textout directory.
OK. Here is the version that will write the file. I strongly suggest that this be run after normal business hours. Again, the only item I could not fix is the number of pages in the report. This is very specific to version 3.71 and has only been tested on that version.
defer.zip
Avatar of amdj

ASKER

So those reports will show up for viewing but user will not know how many pages are there, am I correct?
I will run this after hour.

Thanks
Yes. They can see how many pages by selecting the report and pressing the "Preview" button. The Module, Report Name and Print Date shold be restored correctrly in the Deferred listbox. Attached are screen shots of how it looks in my system with your reports.
Doc1.doc
Avatar of amdj

ASKER

rr_miles,
The report works, but I have just noticed it only brought in reports for one company, we have other companies need to get those reports in also, mainly "AME" company. is the defer program bring in report base on company?
Please advise!
Thanks
It brings in all companies. To see the other companies, you must change companies and reopen the Deferred listbox. Each report was scanned for the company name and then compared to the list of companies in Library Master, Company Maintenance. During testing I noticed a company named Elation Lighting for the I/M module.
Avatar of amdj

ASKER

It seems there were no import reports for company AME (American) company.  
Can you send an example?
Avatar of amdj

ASKER

When switching between diferent company, I can see those imported reports but I think reports for AME company were ignored some how. AME is the most active company in the system. The company AML is my default company when I logon to MAS200. When switch to AME the list is short.

What example do you want to see?
A dp#### file from the ..\home\textout folder, that belongs to the AME company, that is not in the Deferred listbox. Is it possible files from that company were already printed and purged by MAS90?
Avatar of amdj

ASKER

I will find a dp file that is belong to AME, I don't think they were purged.
It's hard to view dp file with a text editor.
Avatar of amdj

ASKER

Actually there are some dp?????.TXT format which did not make it into the MAS200, but I copy them and send them to users as it is.
Can this dp?????.TXT be read into the database?

Thanks
The program defer, would ignore a dp.####.txt because it has a file extension (txt) just as it would ignore a dp####.xls as both caused errors during our early testing. Also both would be ignored as they do not have the correct first 4 bytes that indicate a Deferred file. I dont know what would happen to a pure ASCII file in the Deferred subsystem. I will try a test and let you know. It would be helpful if you would send an example file.
The program defer, would ignore a dp.####.txt because it has a file extension (txt) just as it would ignore a dp####.xls as both caused errors during our early testing. Also both would be ignored as they do not have the correct first 4 bytes that indicate a Deferred file. I dont know what would happen to a pure ASCII file in the Deferred subsystem. I will try a test and let you know. It would be helpful if you would send an example file.
Avatar of amdj

ASKER

It's ok I can pull those txt files and give them to users, but don't why AME company does not have much in the defere printing, as AME is the most busiest company. Is there any chance that they got ignored?
If they follow the same rules as I outlined in my last post they would be included unless a record was already in the Deferred file. Then it would appear in the listbox
If they follow the same rules as I outlined in my last post they would be included unless a record was already in the Deferred file. Then it would appear in the listbox
ASKER CERTIFIED SOLUTION
Avatar of rr_miles
rr_miles

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amdj

ASKER

Thanks!
Just to let you know, I am with this company less than 2 years and had never used Sage MAS200 before came to this company, so I am a newbie on this.

Avatar of amdj

ASKER

Looks like no ones did any defere print on AME company.

Thanks for all your help! Good job rr_miles
Avatar of amdj

ASKER

The expert has solved my problem, thanks rr_miles!
Avatar of amdj

ASKER

Great Job!