Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Electronically burst a PRN file that contains 50 reports.

Posted on 2001-06-09
6
Medium Priority
?
250 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 200 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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…
Suggested Courses

610 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