Solved

Electronically burst a PRN file that contains 50 reports.

Posted on 2001-06-09
6
213 Views
Last Modified: 2010-05-02
Can VB be used to create a program to burst a PRN file containing 50 reports?  Is there a better way to do this?

The program would start at the first line of the file.  It would store the first line and then proceed to the first line of the next page and compare it to the first line on the previous page. When the first line of the page changes a new report has started.  All subsequent pages would be cut and pasted to a new file and given a file name using the first line of the page.  The program would then continue using the new first line of the file.  This would continue until the end of the file has been reached.
0
Comment
Question by:claudedavidj
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:Microsoft
ID: 6171687
would this be used for checking a file to see if there is any duplicate pages by any chance ?

the answer is yes

0
 

Author Comment

by:claudedavidj
ID: 6171766
Checking for duplicate pages would be a good addition to the program.  But the main job to be accomplished is to burst the PRN file into the 50 separate reports that are contained in it.  The PRN file is 90 megs.
0
 
LVL 4

Expert Comment

by:mcoop
ID: 6172781
If the PRN file is plain text, or close enough to plain text, then the task isn't all that hard, however if it is targeted at a specific printer, then chances are that the text is broken down to graphic words, and will be very difficult to parse apart (i.e. you need to emulate the printer's inmternal code to process the print stream).

Can you cut & paste a bit of the PRN file (say first 256 bytes from a couple of pages) - so we can see what is in the PRN file.

(This will also be affected if you choose a different printer driver at different times - the PRN file will contain different print stream data.)

Of course the answer to a lot of this is to select the Generic TTY print driver when you create the PRN file - at least this will be plain text - but won't have any of your fancy report formatting (which you probably want to keep).

Over to you.

DO you have any other options - like driving the application in some way to generate the reports separately... ?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:claudedavidj
ID: 6174798
Unfortunately we are dealing with a legacy mainframe accounting application that is table driven with very poor report distribution capabilities.  Cobol programs are necessary just to send the reports to a data set on the mainframe.  We then FTP the file from the mainframe to our PC.  Whatever bursting is done will have to take place on the file server or PC after FTP.

The reports contain accounting information with three to six sort levels or groupings.  Graphics are minimal.  I will post a few pages.
0
 
LVL 4

Accepted Solution

by:
mcoop earned 50 total points
ID: 6174816
The good news is that as a mainframe based COBOL program, it is likely to be nearly plain-vanilla ASCII text.  
This will make it relatively easy to do what you want.

If you can find somewhere (FTP site?) to post a full report file, I'll put some code together to rip it apart.

Alternately, you can send it to me directly at mcoop@aussietech.com
0
 
LVL 4

Expert Comment

by:mcoop
ID: 6200368
Which part of my answers helped ??
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now