MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » December 2013

Re: conversion of an old query /400



fixed

Hi

You can use 2 commands - RTVQMQRY and RTVQMFORM - to convert Query/400 queries.

You might run the ANZQRY command first. This will notify you of possible issues, many related to presentation and not to data.

Break levels are part of presentation, and that is the QMFORM piece.

Also, ordering may effect your results - and there is nothing to guarantee order without specific instructions with an ORDER BY or the equivalent in Query/400.

Anyhow, RTVQM* commands generate source that contains what is needed to create the objects (QMQRY and QMFORM).

Are all the join types- are they type 1? Then the SELECT statement should be fine at all releases of the OS.

If some are other than type 1, you need to put on a PTF - there was a long-standing bug in the RTVQMQRY that it made a SELECT with only type 1 joins, no matter what.

Here are the PTFs from v5r4 - the earliest release for which they are available -

V5R4SI42309
6.1SI42345
7.1SI42363

I have given a presentation on QM stuff at COMMON and elsewhere, contact me off-list if you want a copy - also a lab.

FYI - Query/400 queries combine data retrieval and presentation in one object - QM separates them - QMQRY is data retrieveal (SELECT statement) and QMFORM is presentation - level breaks, column headings, all that stuff.

QMQRYs can be used for almost any SQL statement - not just SELECTs - that's a topic for another day, of course.

Cheers
Vern

On 12/26/2013 4:59 PM, Hoteltravelfundotcom wrote:
HI I have been unable to duplicate this query.
It uses 5 files it matches from the orderhistory file to customer, and
shipping, invoice history and address files.
OHENT# EQ ADENT#
OHSFX# EQ ADSFX#
OHORD# EQ IDORD#
OHENT# EQ ACENT#
OHSFX# EQ ACSSF#

has some record selects and sorting, no problems so far. Does totals on qty
shipped and $shipped.

Does break levels on 9 fields. this is the part I cannot translate. then
puts the data to a temp file.

I am not getting the same number of records no matter what. am sure the
issue is how to code this Break in SQL.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact