Spacing in Query400

Posted on 2011-05-03
Last Modified: 2012-06-21
Hi, I'm really new with OS400 system. Right now I understand how to use Query400 and in the process of creating a report out of a query. The problem that I have is I would like to add a space after each territory, when I press 'F5' to look at the result, I see the space because I define 'Page break' for it but when I send the result to spool file or export it to Excel. The space is gone. Is there a way to keep the spacing?
Question by:coronoahcoro
    LVL 34

    Accepted Solution

    When you print it the space is there.  Just doesn't show up on the screen (WRKSPLF).  IT'll show up if you print it.  That is a WRKSPLF thing, not a query thing.  WRKSPLF compresses out blank lines.

    As far as Excel goes, that has nothing to do with Query/400.  Query just dumps the data to a database file, so any formatting you do is always lost.

    You'll need to format the data in Excel.  It is possible to use the Client Access plug-in for Excel to define a range in a formatted spreadsheet based on a database query.

    Here's how to add it:
    Here's how to use it to pull data from the AS/400:

    - Gary Patterson
    LVL 26

    Expert Comment

    ...when I send the result to spool file or export it to Excel. The space is gone.

    I wouldn't expect a "space" in Excel, but you didn't say how you got Query/400 output into Excel. What process do you use to "export" to Excel?

    Also, you didn't describe what you mean by "...send the result to spool file". Is that intended to mean that the spooled file was actually printed and the printer did not insert blank lines where you expected them? Or does it mean that you vied the spooled file while it was queued on an output queue and you didn't see any blank lines? Blank lines are not shown when a spooled file is displayed.

    LVL 2

    Author Comment

    1. I use the iSeries add-in in Excel to export the data from AS400 to Excel
    2. I meant when I view the file with WRKSPLF, I didn't see any blank line
    LVL 34

    Expert Comment

    by:Gary Patterson
    Blank lines don't show up in WRKSPLF, intentionally.  They are there if you print the file,  though.  

    I find this annoying, because I, too, would like to see it on screen in the same format as when printed.

    - Gary Patterson

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the fileā€¦

    728 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

    20 Experts available now in Live!

    Get 1:1 Help Now