× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 04 May 2013 10:57, Vernon Hamberg wrote:
The bad news is, QM forms are relatively difficult to create source
for - Query Management Programming DOES have all the info, not for
the faint of heart. A person CAN use the RTVQMFORM from a QRYDFN and
get a shell for the form source, as a starting point.

Although difficult [for most people] to free-hand code a QM Form source, it is pretty easy to access a system with the 57xxST1 product installed, and then to use the STRQM on that system to create a *QMFORM object which is compatible with the SELECT that is defined in the QM Query. That *QMFORM object would be saved and then restored to the system where the STRQMQRY will be performed; the target system. Or if save is not available at the system with STRQM, or restore is not available on the target system, then just export the form into source [using RTVQMFORM of the *QMFORM object], and transport that exported source to the target system, from which a CRTQMFORM can be issued.

Even so, I would guess that the requirements of the OP will not be met by what I recall are the limitations of the QMQRY reporting. IIRC there is no ability to reposition the fields within the page beyond columnar. I would guess that it is very unlikely that an RPG program spooling to produce a /form/ could be easily replaced by a columnar report which happens to allow text-wrap of one or more of the fields.

FWiW: I was able to use a free-access v5r3 system to use STRQM to create a *QMFORM object and then export that form. With that...

The following scripted request can use the truncated QMFORM source [which is included as part of the "//DATA QMFORMDATA"] to produce a report with LONGFIELD being /text wrapped/ just as the OP requested, according to the CT character editing specification:

//BCHJOB JOB(PETER) JOBD(has_USER_specified)
//DATA SQLSCRIPT
create table qtemp/peter
(item char(8), attr char(8), dimn char(8), longfield char(64))
;
insert into qtemp/peter values('3X748411', 'BLUWID7T', '21X17X07'
, 'MAN BASIC W/ BUILT IN OSTOMY SUPPORT/BARRIER, MODULAR SYSTEM')
;
//
//DATA QMQRYDATA
select * from qtemp/peter
//
//DATA QMFORMDATA
H QM4 05 F 01 E V W E R 01 03 13/05/04 22:22
V 1001 050
T 1110 004 005 1115 006 1116 005 1117 005 1118 003 1113 062
R 2 2 ITEM
R 2 3 ATTR
R 2 4 DIMN
R 0 20 CT 1 LONGFIELD
//
runsqlstm SQLSCRIPT commit(*none) naming(*sys) errlvl(30)
crtsrcpf qtemp/src rcdlen(91)
cpyf QMQRYDATA qtemp/src tombr(QMQRYDATA ) mbropt(*replace)
cpyf QMFORMDATA qtemp/src tombr(QMFORMDATA) mbropt(*replace)
crtqmqry qtemp/peter qtemp/src QMQRYDATA
crtqmform qtemp/peter qtemp/src QMFORMDATA
strqmqry qtemp/peter qmform(qtemp/peter)
//ENDBCHJOB

Note: The above source could be submitted with SBMDBJOB, or the effects mimicked interactively.

The report produced using that form [which moves the LONGFIELD to the first position, indents zero positions, establishing Character Text wrapping per CT, and wrapping within 20 position width] looks like the following; but with a default page footing, which I omitted:

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
LONGFIELD ITEM ATTR DIMN
-------------------- -------- -------- --------
MAN BASIC W/ BUILT 3X748411 BLUWID7T 21X17X07
IN OSTOMY
SUPPORT/BARRIER,
MODULAR SYSTEM


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.