Solved

Electronically burst a PRN file that contains 50 reports.

Posted on 2001-06-09
6
225 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

839 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