Solved

Electronically burst a PRN file that contains 50 reports.

Posted on 2001-06-09
6
221 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

831 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