Sunteți pe pagina 1din 27

Work with Query/400

Day 22
Query/400:
Overview:
This module enables the student to understand the concept of Query400.

Outline:
Topics covered,
a. Query/400
b. Creation of Query
c. Runnin of Query
d. !pdation of Query
e. "evel #rea$s
Objective:
#y the end of this module, the student should be able to%
!nderstandin the Query/400 and its function
& Du$e'tar Technoloies (vt. "td.
)/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
Query/400
Query for i'eries is an +#, licensed proram and a decision support utility that can be
used to obtain information from the D#2 !niversal Database for i'eries database.
-ou use Query to select, arrane, and analy.e information /data0 stored in one or more
database 1les to produce reports and other data 1les. -ou can create your o2n 3uery
de1nitions and then run them, you can run e4istin 3ueries.
-ou can use Query to obtain information from a sinle 1le or a combined set of up to 52
1les. -ou can select all the 1elds, or a fe2 of the 1elds and orani.e them as you 2ant
them to appear in the type of output chosen. -ou can have all records in the 1les
included in the output, or you can select only a fe2 to be included, usin record selection
tests.
Files, felds, and record forats in Query for i!eries
+nformation, or data, is orani.ed and stored on your system in various forms, primarily
in ob6ects called database fles" 7 1le contains individual units of information, called
records, that each contains related pieces of data. 8ach piece of information in a record
is called a feld, and ho2 the 1elds are orani.ed is de1ned in a record forat"
& Du$e'tar Technoloies (vt. "td.
2/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22

Query has four commands, 2hich can be entered from any command line%
). !#$Q$% brins up the Query menu.
2" W$&Q$% brins up the 9or$ 2ith Queries display.
5. Run Query '$()Q$%* runs an e4istin 3uery, or you can use it to run a default 3uery.
This command can also be embedded in C" prorams so that you could, for e4ample, run
several 3ueries overniht.
4. Delete Query '+,#Q$%* deletes one or several 3uery de1nitions.
& Du$e'tar Technoloies (vt. "td.
5/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
:n command line type !#$Q$%
Work with Members Using PDM S653278B

File . . . . . . MYS!
"ibr#r$ . . . . PB%7U%&D Position to . . . . .

'$(e o(tions) (ress *nter.
2+*,it 3+!o($ -+Delete 5+Dis(l#$ 6+Print 7+en#me
8+Dis(l#$ ,es.ri(tion /+S#0e &3+!h#nge te1t &-+!om(ile &5+!re#te mo,2le...

3(t Member '$(e 'e1t
S'UD& PF S'UD*4' D*'56"S



Bottom
P#r#meters or .omm#n,
+++7 S'8Y
F3+*1it F-+Prom(t F5+e9resh F6+!re#te
F/+etrie0e F&%+!omm#n, entr$ F23+More o(tions F2-+More ke$s

Query utilities
9or$ 2ith 3ueries
8U*Y 82er$ Utilities
S$stem: S653278B
Sele.t one o9 the 9ollowing:

82er$ 9or 5S;-%%
&. Work with <2eries
2. 2n #n e1isting <2er$
3. Delete # <2er$

DB2 9or 5S;-%%
&%. St#rt DB2 82er$ M#n#ger 9or 5S;-%%

82er$ m#n#gement
2%. Work with <2er$ m#n#gement 9orms
2&. Work with <2er$ m#n#gement <2eries
22. St#rt # <2er$
23. 5n#l$=e # 82er$ 9or 5S;-%% ,e9inition
More...
Sele.tion or .omm#n,
+++7 &

F3+*1it F-+Prom(t F/+etrie0e F&2+!#n.el F&3+6n9orm#tion 5ssist#nt
F&6+5S;-%% M#in men2
>!? !3PY6@A' 6BM !3P. &/8%) 2%%2.
Query #ask +escri-tion of #ask
./0reate Creates /de1nes0 a ne2 3uery. 9hen this option is processed, the De1ne the
Query
display is sho2n so you can start de1nin a 3uery.
1/0han2e Chanes an e4istin 3uery de1nition.
3/0o-y Copies an e4istin 3uery de1nition.
& Du$e'tar Technoloies (vt. "td.
4/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
4/+elete Deletes an e4istin 3uery de1nition. The Con1rm Delete of Queries display is
sho2n.
4/+is-lay 'ho2s the de1nition of a 3uery 2ithout bein able to chane it.
5/6rint defnition (rints a 3uery de1nition
7/$un in batch Runs a 3uery in batch, reducin the resource drain caused by runnin
the 3uery interactively.
8/$un Runs a 3uery. Query displays a report, prints a report, or puts the data into a
database
1le, dependin on 2hat is speci1ed in the 3uery de1nition.
Work with 82eries

'$(e .hoi.es) (ress *nter.

3(tion . . . . . . & &+!re#te) 2+!h#nge) 3+!o($) -+Delete
5+Dis(l#$) 6+Print ,e9inition
8+2n in b#t.h) /+2n
82er$ . . . . . . . 8Y& 4#me) F- 9or list
"ibr#r$ . . . . . PB%7U%&D 4#me) B"6B") F- 9or list






F3+*1it F-+Prom(t F5+e9resh F&2+!#n.el
>!? !3PY6@A' 6BM !3P. &/88
!electin2 o-tions for a Query for i!eries 9uery defnition
To select options that you 2ant to use from those listed in the Query Defnition Option
column, type a ) in the Opt /option0 column beside each of those options, then press the
8nter $ey. The displays for the options you select are then sho2n one after the other so
you can create those parts of the 3uery de1nition.
;ollo2in are brief descriptions of each of the de1nition steps.
!-ecify fle selections
This option is re3uired, and you use it to specify the 1le or 1les from 2hich you 2ant your
3uery to obtain information. +f you specify more than one 1le, you are sho2n the displays
on 2hich you
specify ho2 you 2ant the 1les 6oined.
+efne result felds
!se this option to de1ne 1elds that do not e4ist in your 1les but you 2ant to use in your
3uery.
!elect and se9uence felds
& Du$e'tar Technoloies (vt. "td.
</2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
!se this option to select the 1elds /from your selected 1le/s0 and your result 1elds0 that
you 2ant
to appear on your report. -ou also specify in 2hat order you 2ant them to appear.
& Du$e'tar Technoloies (vt. "td.
=/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
!elect records
!se this option to select records, from your selected 1le or 1les, if you only 2ant
particular records to be included in your report.
!elect sort felds
!se this option to specify 2hat 1elds to sort on so that your output records appear in a
particular
order /such as alphabetically or in descendin or ascendin order0.
!elect collatin2 se9uence
!se this option to select a collatin se3uence for your 3uery. The collatin se3uence you
select can a>ect many di>erent thins in your 3uery, includin record selection and the
order of records 2hen they are sorted. -ou can also specify a di>erent lanuae for a
particular 3uery. -ou can set your collatin se3uence defaults 2hile de1nin your 1rst
3uery and thereby never have to chane the collatin se3uence aain.
!-ecify re-ort colun forattin2
!se this option to chane the column headins, column spacin, numeric editin, lenth,
and decimal positions for 1elds that appear in your report.
!elect re-ort suary functions
!se this option to specify one or more /or all0 of the types of summary functions for each
1eld in your report% total, averae, minimum value, ma4imum value, and count.
+efne re-ort breaks
!se this option to specify ho2 to brea$ your report into roups of records.
!elect out-ut ty-e and out-ut for
!se this option to specify if you 2ant your output to be displayed, printed, or sent to a
database 1le. +f you 2ant your output printed, you also specify printer attributes. -ou
also use this option to specify 2hether you 2ant detailed or summary?only output.
!-ecify -rocessin2 o-tions
!se this option to specify if you 2ant the results of your 3uery calculations to be
truncated or rounded, if you 2ant decimal data errors inored, or if you 2ant to inore
character substitution 2arnins durin conversion.
!u22ested se9uence of tasks for creatin2 Query for i!eries 9ueries
The follo2in is a suested se3uence of tas$s to create 3ueries%
De1ne result 1elds before selectin and se3uencin 1elds.
'pecify comparisons used for selectin records before selectin and se3uencin
1elds.
'elect and se3uence 1elds and specify sort 1elds before you reformat columns.
'elect sort 1elds before you de1ne report brea$s.
& Du$e'tar Technoloies (vt. "td.
*/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
(ress ;< to vie2 your 3uery results and ;)5 to vie2 your report layout before and
after you reformat columns.
'pecify ;ile selection
De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !*5'*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
& S(e.i9$ 9ile sele.tions
De9ine res2lt 9iel,s
Sele.t #n, se<2en.e 9iel,s
Sele.t re.or,s
Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
S(e.i9$ re(ort .ol2mn 9orm#tting
Sele.t re(ort s2mm#r$ 92n.tions
De9ine re(ort bre#ks
Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions


F3+*1it F5+e(ort F&2+!#n.el
F&3+"#$o2t F&8+Files F2&+Sele.t #ll

S(e.i9$ File Sele.tions

'$(e .hoi.es) (ress *nter. Press F/ to s(e.i9$ #n #,,ition#l
9ile sele.tion.

File . . . . . . . . . S'UD*4' 4#me) F- 9or list
"ibr#r$ . . . . . . PB%7U%&D 4#me) B"6B") F- 9or list
Member . . . . . . . . BF6S' 4#me) BF6S') F- 9or list
Form#t . . . . . . . . S'UD 4#me) BF6S') F- 9or list






F3+*1it F-+Prom(t F5+e(ort F/+5,, 9ile
F&2+!#n.el F&3+"#$o2t F2-+More ke$s
Sele.t 9ile>s?) or (ress *nter to .on9irm.

& Du$e'tar Technoloies (vt. "td.
@/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22

De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !*5'*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
De9ine res2lt 9iel,s
Sele.t #n, se<2en.e 9iel,s
Sele.t re.or,s
Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
S(e.i9$ re(ort .ol2mn 9orm#tting
Sele.t re(ort s2mm#r$ 92n.tions
De9ine re(ort bre#ks
Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions


F3+*1it F5+e(ort
F&3+"#$o2t F&8+Files F2&+Sele.t #ll
Sele.t o(tions) or (ress F3 to s#0e or r2n the <2er$.
(ress ;5 to save or run the Query
*1it this 82er$

'$(e .hoi.es) (ress *nter.

S#0e ,e9inition . . . Y Y+Yes) 4+4o

2n o(tion . . . . . . & &+2n inter#.ti0el$
2+2n in b#t.h
3+Do not r2n

For # s#0e, ,e9inition:
82er$ . . . . . . . 8Y& 4#me
"ibr#r$ . . . . . PB%7U%&D 4#me) F- 9or list

'e1t . . . . . . . .

52thorit$ . . . . . B"6B!'5U' B"6B!'5U') #2thori=#tion list n#me)
B!A54@*) B5"") B*C!"UD*) BUS*




F-+Prom(t F5+e(ort F&2+!#n.el F&3+"#$o2t
F&-+De9ine the <2er$

& Du$e'tar Technoloies (vt. "td.
A/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
:utput
Dis(l#$ e(ort
82er$ . . . : PB%7U%&3;8Y& e(ort wi,th . . . . . : 6/
Position to line . . . . . Shi9t to .ol2mn . . . . . .
"ine ....D....&....D....2....D....3....D....-....D....5....D....6....D....
3"" 43 S'UD*4' 45M* !3US* !3D* !3US* 45M* 5DD*SS !3US* F**S
%%%%%& & 555 &%% B5S6! PU4* 3)%%%
%%%%%2 2 BBBB 2%% EB PU4* 5)%%%
%%%%%3 3 !!!!! 3%% 5S-%% B3MB 3%)%%%
%%%%%- - DDDDD 2%% EB 45SA 5)%%%
BBBBBB BBBBBBBB *n, o9 re(ort BBBBBBBB



Bottom
F3+*1it F&2+!#n.el F&/+"e9t F2%+ight F2&+S(lit

(ress ;5B84it
Type :ption 2 to ma$e chanes in 3uery.
Work with 82eries

'$(e .hoi.es) (ress *nter.

3(tion . . . . . . 2 &+!re#te) 2+!h#nge) 3+!o($) -+Delete
5+Dis(l#$) 6+Print ,e9inition
8+2n in b#t.h) /+2n
82er$ . . . . . . . 8Y& 4#me) F- 9or list
"ibr#r$ . . . . . PB%7U%&D 4#me) B"6B") F- 9or list





F3+*1it F-+Prom(t F5+e9resh F&2+!#n.el
82er$ o(tion (ro.essing .om(lete, s2..ess92ll$.
De1ne result 1elds.
& Du$e'tar Technoloies (vt. "td.
)0/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !A54@*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
& De9ine res2lt 9iel,s
Sele.t #n, se<2en.e 9iel,s
Sele.t re.or,s
Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
S(e.i9$ re(ort .ol2mn 9orm#tting
Sele.t re(ort s2mm#r$ 92n.tions
De9ine re(ort bre#ks
Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions


F3+*1it F5+e(ort F&2+!#n.el
F&3+"#$o2t F&8+Files F2&+Sele.t #ll

(ress enter
De9ine es2lt Fiel,s

'$(e ,e9initions 2sing 9iel, n#mes or .onst#nts #n, o(er#tors) (ress *nter.
3(er#tors: D) F) B) ;) SUBS') GG) D5'*...

Fiel, *1(ression !ol2mn Ae#,ing "en De.
!34S F**S B %.&% !34!*SS634 7 2




Bottom

Fiel, Fiel,
3"" 5DD
S45M* F**S
!!D
!3S
Bottom
F3+*1it F5+e(ort F/+6nsert F&&+Dis(l#$ te1t
F&2+!#n.el F&3+"#$o2t F2%+eorg#ni=e F2-+More ke$s

84it, 'ave and Run
& Du$e'tar Technoloies (vt. "td.
))/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
*1it this 82er$

'$(e .hoi.es) (ress *nter.

S#0e ,e9inition . . . Y Y+Yes) 4+4o

2n o(tion . . . . . . & &+2n inter#.ti0el$
2+2n in b#t.h
3+Do not r2n

For # s#0e, ,e9inition:
82er$ . . . . . . . 8Y& 4#me
"ibr#r$ . . . . . PB%7U%&D 4#me) F- 9or list

'e1t . . . . . . . .

52thorit$ . . . . . B!A54@* B"6B!'5U') #2thori=#tion list n#me)
B!A54@*) B5"") B*C!"UD*) BUS*



F-+Prom(t F5+e(ort F&2+!#n.el F&3+"#$o2t
F&-+De9ine the <2er$

:utput
Dis(l#$ e(ort
82er$ . . . : PB%7U%&D;8Y& e(ort wi,th . . . . . : 6/
Position to line . . . . . Shi9t to .ol2mn . . . . . .
"ine ....D....&....D....2....D....3....D....-....D....5....D....6....D....
!4!S634 3"" 43 S'UD 45M* !3S !3D* !3S 45M* 5DS !3S F**
%%%%%& 3%%.%% & 555 &%% B5S6! PU4* 3)%%%
%%%%%2 5%%.%% 2 BBBB 2%% EB PU4* 5)%%%
%%%%%3 3)%%%.%% 3 !!!!! 3%% 5S-%% B3MB 3%)%%%
%%%%%- 5%%.%% - DDDDD 2%% EB 45SA 5)%%%
BBBBBB BBBBBBBB *n, o9 re(ort BBBBBBBB



Bottom
F3+*1it F&2+!#n.el F&/+"e9t F2%+ight F2&+S(lit

'elect and se3uence 1elds
& Du$e'tar Technoloies (vt. "td.
)2/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !A54@*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
7 De9ine res2lt 9iel,s
& Sele.t #n, se<2en.e 9iel,s
Sele.t re.or,s
Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
S(e.i9$ re(ort .ol2mn 9orm#tting
Sele.t re(ort s2mm#r$ 92n.tions
De9ine re(ort bre#ks
Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions

F3+*1it F5+e(ort F&2+!#n.el
F&3+"#$o2t F&8+Files F2&+Sele.t #ll

Sele.t #n, Se<2en.e Fiel,s

'$(e se<2en.e n2mber >%F////? 9or the n#mes o9 2( to 5%% 9iel,s to
#((e#r in the re(ort) (ress *nter.

Se< Fiel,
7 !34S
& 3""
2 S45M*
- !!D
3 !3S
5 5DD
6 F**S



Bottom
F3+*1it F5+e(ort F&&+Dis(l#$ te1t F&2+!#n.el
F&3+"#$o2t F2%+en2mber F2&+Sele.t #ll F2-+More ke$s

& Du$e'tar Technoloies (vt. "td.
)5/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
Sele.t #n, Se<2en.e Fiel,s

'$(e se<2en.e n2mber >%F////? 9or the n#mes o9 2( to 5%% 9iel,s to
#((e#r in the re(ort) (ress *nter.

Se< Fiel,
& 3""
2 S45M*
3 !3S
- !!D
5 5DD
6 F**S
7 !34S

Bott
om
F3+*1it F5+e(ort F&&+Dis(l#$ te1t F&2+!#n.el
F&3+"#$o2t F2%+en2mber F2&+Sele.t #ll F2-+More ke$s
Press *nter to .on9irm.
:utput
Dis(l#$ e(ort
82er$ . . . : PB%7U%&D;8Y& e(ort wi,th . . . . . : 6/
Position to line . . . . . Shi9t to .ol2mn . . . . . .
"ine ....D....&....D....2....D....3....D....-....D....5....D....6....D....
3"" 43 S'UD 45M* !3S 45M* !3S !3D* 5DS !3S F** !4!S634
%%%%%& & 555 B5S6! &%% PU4* 3)%%% 3%%.%%
%%%%%2 2 BBBB EB 2%% PU4* 5)%%% 5%%.%%
%%%%%3 3 !!!!! 5S-%% 3%% B3MB 3%)%%% 3)%%%.%%
%%%%%- - DDDDD EB 2%% 45SA 5)%%% 5%%.%%
BBBBBB BBBBBBBB *n, o9 re(ort BBBBBBBB



Bottom
F3+*1it F&2+!#n.el F&/+"e9t F2%+ight F2&+S(lit
'elect Records
& Du$e'tar Technoloies (vt. "td.
)4/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !A54@*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
7 De9ine res2lt 9iel,s
7 Sele.t #n, se<2en.e 9iel,s
& Sele.t re.or,s
Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
S(e.i9$ re(ort .ol2mn 9orm#tting
Sele.t re(ort s2mm#r$ 92n.tions
De9ine re(ort bre#ks
Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions


F3+*1it F5+e(ort
F&3+"#$o2t F&8+Files F2&+Sele.t #ll

Sele.t e.or,s

'$(e .om(#risons) (ress *nter. S(e.i9$ 3 to st#rt e#.h new gro2(.
'ests: *8) 4*) "*) @*) "') @') 54@*) "6S') "6H*) 6S) 6S43'...

54D;3 Fiel, 'est E#l2e >Fiel,) 42mber) I!h#r#.tersI) or ...?
3"" *8 &


Bottom


Fiel, Fiel,
3"" F**S
S45M* !34S
!3S
!!D
5DD
Bottom
F3+*1it F5+e(ort F/+6nsert F&&+Dis(l#$ te1t
F&2+!#n.el F&3+"#$o2t F2%+eorg#ni=e F2-+More ke$s
:utput
& Du$e'tar Technoloies (vt. "td.
)</2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
Dis(l#$ e(ort
82er$ . . . : PB%7U%&3;8Y& e(ort wi,th . . . . . : 6/
Position to line . . . . . Shi9t to .ol2mn . . . . . .
"ine ....D....&....D....2....D....3....D....-....D....5....D....6....D....
3"" 43 S'UD 45M* !3S 45M* !3S !3D* 5DS !3S F** !4!S634
%%%%%& - DDDDD EB 2%% 45SA 5)%%% 5%%.%%
%%%%%2 3 !!!!! 5S-%% 3%% B3MB 3%)%%% 3)%%%.%%
%%%%%3 2 BBBB EB 2%% PU4* 5)%%% 5%%.%%
BBBBBB BBBBBBBB *n, o9 re(ort BBBBBBBB




Bottom
F3+*1it F&2+!#n.el F&/+"e9t F2%+ight F2&+S(lit


'elect sort 1elds
De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !A54@*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
7 De9ine res2lt 9iel,s
7 Sele.t #n, se<2en.e 9iel,s
7 Sele.t re.or,s
& Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
S(e.i9$ re(ort .ol2mn 9orm#tting
Sele.t re(ort s2mm#r$ 92n.tions
De9ine re(ort bre#ks
Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions


F3+*1it F5+e(ort F&2+!#n.el
F&3+"#$o2t F&8+Files F2&+Sele.t #ll

(ress enter
& Du$e'tar Technoloies (vt. "td.
)=/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
Sele.t Sort Fiel,s

'$(e sort (riorit$ >%F///? #n, 5 >5s.en,ing? or D >Des.en,ing? 9or
the n#mes o9 2( to 32 9iel,s) (ress *nter.

Sort
Prt$ 5;D Fiel,
& 5 3""
S45M*
!3S
!!D
5DD
F**S
!34S



Bottom
F3+*1it F5+e(ort F&&+Dis(l#$ te1t F&2+!#n.el
F&3+"#$o2t F&8+Files F2%+en2mber F2-+More ke$s
(ress 8nter to con1rm
Sele.t Sort Fiel,s

'$(e sort (riorit$ >%F///? #n, 5 >5s.en,ing? or D >Des.en,ing? 9or
the n#mes o9 2( to 32 9iel,s) (ress *nter.

Sort
Prt$ 5;D Fiel,
& 5 3""
S45M*
!3S
!!D
5DD
F**S
!34S


Bottom
F3+*1it F5+e(ort F&&+Dis(l#$ te1t F&2+!#n.el
F&3+"#$o2t F&8+Files F2%+en2mber F2-+More ke$s
Press *nter to .on9irm.
:utput
& Du$e'tar Technoloies (vt. "td.
)*/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
Dis(l#$ e(ort
82er$ . . . : PB%7U%&D;8Y& e(ort wi,th . . . . . : 6/
Position to line . . . . . Shi9t to .ol2mn . . . . . .
"ine ....D....&....D....2....D....3....D....-....D....5....D....6....D....
3"" 43 S'UD 45M* !3S 45M* !3S !3D* 5DS !3S F** !4!S634
%%%%%& 2 BBBB EB 2%% PU4* 5)%%% 5%%.%%
%%%%%2 3 !!!!! 5S-%% 3%% B3MB 3%)%%% 3)%%%.%%
%%%%%3 - DDDDD EB 2%% 45SA 5)%%% 5%%.%%
BBBBBB BBBBBBBB *n, o9 re(ort BBBBBBBB



Bottom
F3+*1it F&2+!#n.el F&/+"e9t F2%+ight F2&+S(lit

'elect Collatin 'e3uence

De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !A54@*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
7 De9ine res2lt 9iel,s
7 Sele.t #n, se<2en.e 9iel,s
7 Sele.t re.or,s
7 Sele.t sort 9iel,s
& Sele.t .oll#ting se<2en.e
S(e.i9$ re(ort .ol2mn 9orm#tting
Sele.t re(ort s2mm#r$ 92n.tions
De9ine re(ort bre#ks
Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions

F3+*1it F5+e(ort F&2+!#n.el
F&3+"#$o2t F&8+Files F2&+Sele.t #ll
C+T 8nter
& Du$e'tar Technoloies (vt. "td.
)@/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22

Sele.t !oll#ting Se<2en.e

'he sele.te, .oll#ting se<2en.e will be 2se, 9or .h#r#.ter 9iel,s when
sorting) sele.ting re.or,s) Joining 9iles) 9in,ing minim2m #n, m#1im2m
0#l2es) #n, ,etermining when # .ontrol bre#k h#s o..2rre,.


'$(e .hoi.es) (ress *nter.

!oll#ting se<2en.e
o(tion . . . . . . . & &+Ae1#,e.im#l
2+82er$ 9or iSeries *nglish
3+De9ine the se<2en.e
-+'r#nsl#tion t#ble
5+S$stem sort se<2en.e

For .hoi.e -+'r#nsl#tion t#ble:
'#ble . . . . . . . 4#me) F- 9or list
"ibr#r$ . . . . . 4#me) B"6B") F- 9or list


F3+*1it F-+Prom(t F5+e(ort F&%+Pro.ess;(re0io2s
F&2+!#n.el F&3+"#$o2t F&7+Kob se<2en.e F2-+More ke$s

Report column formattin
De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !A54@*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
7 De9ine res2lt 9iel,s
7 Sele.t #n, se<2en.e 9iel,s
7 Sele.t re.or,s
7 Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
& S(e.i9$ re(ort .ol2mn 9orm#tting
Sele.t re(ort s2mm#r$ 92n.tions
De9ine re(ort bre#ks
Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions


F3+*1it F5+e(ort F&2+!#n.el
F&3+"#$o2t F&8+Files F2&+Sele.t #ll

& Du$e'tar Technoloies (vt. "td.
)A/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
S(e.i9$ e(ort !ol2mn Form#tting

'$(e in9orm#tion) (ress *nter.
!ol2mn he#,ings: B434*) #ligne, te1t lines

!ol2mn
Fiel, S(#.ing !ol2mn Ae#,ing "en De. *,it
3"" % 3"" 43 3 %

S45M* & S'UD 45M* 5

!3S & !3S 45M* 5
!!D & !3S !3D* 3 %

5DD & 5DS 5

F**S & !3S F** 5 %
!34S 3 !4!S634 7 2



F3+*1it F5+e(ort F&%+Pro.ess;(re0io2s F&2+!#n.el
F&3+"#$o2t F&6+*,it F&8+Files F23+"ong .omment

:utput
Dis(l#$ e(ort
82er$ . . . : PB%7U%&D;8Y& e(ort wi,th . . . . . : 65
Position to line . . . . . Shi9t to .ol2mn . . . . . .
"ine ....D....&....D....2....D....3....D....-....D....5....D....6....D
3"" 43 S'UD 45M* !3S 45M* !3S !3D* 5DS !3S F** !4!S634
%%%%%& 2 BBBB EB 2%% PU4* 5)%%% 5%%.%%
%%%%%2 3 !!!!! 5S-%% 3%% B3MB 3%)%%% 3)%%%.%%
%%%%%3 - DDDDD EB 2%% 45SA 5)%%% 5%%.%%
BBBBBB BBBBBBBB *n, o9 re(ort BBBBBBBB

Bottom
F3+*1it F&2+!#n.el F&/+"e9t F2%+ight F2&+S(lit

Report summary functions
& Du$e'tar Technoloies (vt. "td.
20/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !A54@*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
7 De9ine res2lt 9iel,s
7 Sele.t #n, se<2en.e 9iel,s
7 Sele.t re.or,s
7 Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
7 S(e.i9$ re(ort .ol2mn 9orm#tting
& Sele.t re(ort s2mm#r$ 92n.tions
De9ine re(ort bre#ks
Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions


F3+*1it F5+e(ort F&2+!#n.el
F&3+"#$o2t F&8+Files F2&+Sele.t #ll

Sele.t e(ort S2mm#r$ F2n.tions

'$(e o(tions) (ress *nter.
&+'ot#l 2+50er#ge 3+Minim2m -+M#1im2m 5+!o2nt

FFF3(tionsFFF Fiel,
3""
S45M*
!3S
!!D
5DD
3 - F**S
& 5 !34S








Bottom
F3+*1it F5+e(ort F&%+Pro.ess;(re0io2s F&&+Dis(l#$ te1t
F&2+!#n.el F&3+"#$o2t F&8+Files F23+"ong .omment

:utput
& Du$e'tar Technoloies (vt. "td.
2)/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
Dis(l#$ e(ort
82er$ . . . : PB%7U%&D;8Y& e(ort wi,th . . . . . : 6/
Position to line . . . . . Shi9t to .ol2mn . . . . . .
"ine ....D....&....D....2....D....3....D....-....D....5....D....6....D....
3"" 43 S'UD 45M* !3S 45M* !3S !3D* 5DS !3S F** !4!S634
%%%%%& 2 BBBB EB 2%% PU4* 5)%%% 5%%.%%
%%%%%2 3 !!!!! 5S-%% 3%% B3MB 3%)%%% 3)%%%.%%
%%%%%3 - DDDDD EB 2%% 45SA 5)%%% 5%%.%%
%%%%%-
%%%%%5 F645" '3'5"S
%%%%%6 '3'5" -)%%%.%%
%%%%%7 M64 5)%%%
%%%%%8 M5C 3%)%%%
%%%%%/ !3U4' 3
BBBBBB BBBBBBBB *n, o9 re(ort BBBBBBBB
Bottom
F3+*1it F&2+!#n.el F&/+"e9t F2%+ight F2&+S(lit
Report brea$s
De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !A54@*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
7 De9ine res2lt 9iel,s
7 Sele.t #n, se<2en.e 9iel,s
7 Sele.t re.or,s
7 Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
7 S(e.i9$ re(ort .ol2mn 9orm#tting
7 Sele.t re(ort s2mm#r$ 92n.tions
& De9ine re(ort bre#ks
Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions


F3+*1it F5+e(ort
F&3+"#$o2t F&8+Files F2&+Sele.t #ll
Sele.t o(tions) or (ress F3 to s#0e or r2n the <2er$.
(ress enter
& Du$e'tar Technoloies (vt. "td.
22/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
De9ine e(ort Bre#ks

'$(e bre#k le0el >&F6? 9or 2( to / 9iel, n#mes) (ress *nter.
>Use #s m#n$ 9iel,s #s nee,e, 9or e#.h bre#k le0el.?

Bre#k Sort
"e0el Prt$ Fiel,
&% 3""
S45M*
& !3S
!!D
5DD
F**S
!34S




Bottom
F3+*1it F5+e(ort F&%+Pro.ess;(re0io2s F&&+Dis(l#$ te1t
F&2+!#n.el F&3+"#$o2t F&8+Files F23+"ong .omment
(ress enter
Form#t e(ort Bre#k

Bre#k le0el . . . . . . . : %

'$(e .hoi.es) (ress *nter.
>'$(e #n,9iel, in te1t to h#0e bre#k 0#l2es inserte,.?


S2((ress s2mm#ries . . . . 4 Y+Yes) 4+4o

Bre#k te1t . . . . . . . . !3US* '3'5"S


"e0el Fiel,
& !3S


F3+*1it F5+e(ort F&%+Pro.ess;(re0io2s F&2+!#n.el
F&3+"#$o2t F&8+Files F23+"ong .omment

(ress enter
& Du$e'tar Technoloies (vt. "td.
25/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22

Form#t e(ort Bre#k

Bre#k le0el . . . . . . . : &

'$(e .hoi.es) (ress *nter.
>'$(e #n,9iel, in te1t to h#0e bre#k 0#l2es inserte,.?

Ski( to new (#ge . . . . . 4 Y+Yes) 4+4o

S2((ress s2mm#ries . . . . 4 Y+Yes) 4+4o

Bre#k te1t . . . . . . . .



"e0el Fiel,
& !3S




F3+*1it F5+e(ort F&%+Pro.ess;(re0io2s F&2+!#n.el
F&3+"#$o2t F&8+Files F23+"ong .omment

:utput
Dis(l#$ e(ort
82er$ . . . : PB%7U%&D;8Y& e(ort wi,th . . . . . : 6/
Position to line . . . . . Shi9t to .ol2mn . . . . . .
"ine ....D....&....D....2....D....3....D....-....D....5....D....6....D....
3"" 43 S'UD 45M* !3S 45M* !3S !3D* 5DS !3S F** !4!S634
%%%%%& 2 BBBB EB 2%% PU4* 5)%%% 5%%.%%
%%%%%2
%%%%%3 '3'5" 5%%.%%
%%%%%- M64 5)%%%
%%%%%5 M5C 5)%%%
%%%%%6 !3U4' &
%%%%%7
%%%%%8 3 !!!!! 5S-%% 3%% B3MB 3%)%%% 3)%%%.%%
%%%%%/
%%%%&% '3'5" 3)%%%.%%
%%%%&& M64 3%)%%%
%%%%&2 M5C 3%)%%%
%%%%&3 !3U4' &
%%%%&-
%%%%&5 - DDDDD EB 2%% 45SA 5)%%% 5%%.%%
%%%%&6
%%%%&7 '3'5" 5%%.%%
%%%%&8 M64 5)%%%
%%%%&/ M5C 5)%%%
%%%%2% !3U4' &
%%%%2&
%%%%22 !3US* '3'5"S
%%%%23 '3'5" -)%%%.%%
%%%%2- M64 5)%%%
%%%%25 M5C 3%)%%%
%%%%26 !3U4' 3
F3+*1it F&2+!#n.el F&/+"e9t F2%+ight F2&+S(lit

& Du$e'tar Technoloies (vt. "td.
24/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
:utput Type and :utput ;orm
De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !A54@*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
7 De9ine res2lt 9iel,s
7 Sele.t #n, se<2en.e 9iel,s
7 Sele.t re.or,s
7 Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
7 S(e.i9$ re(ort .ol2mn 9orm#tting
7 Sele.t re(ort s2mm#r$ 92n.tions
7 De9ine re(ort bre#ks
& Sele.t o2t(2t t$(e #n, o2t(2t 9orm
S(e.i9$ (ro.essing o(tions


F3+*1it F5+e(ort F&2+!#n.el
F&3+"#$o2t F&8+Files F2&+Sele.t #ll

(ress enter
Sele.t 32t(2t '$(e #n, 32t(2t Form

'$(e .hoi.es) (ress *nter.

32t(2t t$(e . . . . . . . . . . . & &+Dis(l#$
2+Printer
3+D#t#b#se 9ile

Form o9 o2t(2t . . . . . . . . . . 2 &+Det#il
2+S2mm#r$ onl$

"ine wr#((ing . . . . . . . . . . 4 Y+Yes) 4+4o
Wr#((ing wi,th . . . . . . . . . Bl#nk) &F378
e.or, on one (#ge . . . . . . . 4 Y+Yes) 4+4o


F3+*1it F5+e(ort F&%+Pro.ess;(re0io2s
F&2+!#n.el F&3+"#$o2t F&8+Files


(ress enter
& Du$e'tar Technoloies (vt. "td.
2</2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
:utput
Dis(l#$ e(ort
82er$ . . . : PB%7U%&D;8Y& e(ort wi,th . . . . . : 36
Position to line . . . . . Shi9t to .ol2mn . . . . . .
"ine ....D....&....D....2....D....3....D.
!3S 45M* !3S F** !4!S634
%%%%%& EB
%%%%%2 '3'5" 5%%.%%
%%%%%3 M64 5)%%%
%%%%%- M5C 5)%%%
%%%%%5 !3U4' &
%%%%%6
%%%%%7 5S-%%
%%%%%8 '3'5" 3)%%%.%%
%%%%%/ M64 3%)%%%
%%%%&% M5C 3%)%%%
%%%%&& !3U4' &
%%%%&2
%%%%&3 EB
%%%%&- '3'5" 5%%.%%
%%%%&5 M64 5)%%%
%%%%&6 M5C 5)%%%
%%%%&7 !3U4' &
%%%%&8
%%%%&/ !3US* '3'5"S
%%%%2% '3'5" -)%%%.%%
%%%%2& M64 5)%%%
%%%%22 M5C 3%)%%%
%%%%23 !3U4' 3
BBBBBB BBBBBBBB *n, o9 re(ort BBBBBBBB

More...
F3+*1it F&2+!#n.el F&/+"e9t F2%+ight F2&+S(lit

(rocessin :ptions
De9ine the 82er$

82er$ . . . . . . : 8Y& 3(tion . . . . . : !A54@*
"ibr#r$ . . . . : PB%7U%&D !!S6D . . . . . . : 65535

'$(e o(tions) (ress *nter. Press F2& to sele.t #ll.
&+Sele.t

3(t 82er$ De9inition 3(tion
7 S(e.i9$ 9ile sele.tions
7 De9ine res2lt 9iel,s
7 Sele.t #n, se<2en.e 9iel,s
7 Sele.t re.or,s
7 Sele.t sort 9iel,s
Sele.t .oll#ting se<2en.e
7 S(e.i9$ re(ort .ol2mn 9orm#tting
7 Sele.t re(ort s2mm#r$ 92n.tions
7 De9ine re(ort bre#ks
7 Sele.t o2t(2t t$(e #n, o2t(2t 9orm
& S(e.i9$ (ro.essing o(tions


F3+*1it F5+e(ort F&2+!#n.el
F&3+"#$o2t F&8+Files F2&+Sele.t #ll
& Du$e'tar Technoloies (vt. "td.
2=/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.
Work with Query/400
Day 22
S(e.i9$ Pro.essing 3(tions

'$(e .hoi.es) (ress *nter.

Use ro2n,ing . . . . . . . . . . . Bl#nk) Y+Yes) 4+4o

6gnore ,e.im#l
,#t# errors . . . . . . . . . . Bl#nk) Y+Yes) 4+4o

6gnore .h#r#.ter
s2bstit2tion w#rnings . . . . . Y Y+Yes) 4+4o

Use .oll#ting se<2en.e 9or
#ll .h#r#.ter .om(#risons . . . Y Y+Yes) 4+4o



F3+*1it F5+e(ort F&%+Pro.ess;(re0io2s
F&2+!#n.el F&3+"#$o2t F&8+Files

& Du$e'tar Technoloies (vt. "td.
2*/2*
No part of this document can be copied, reproduced in any form, complete or partial without written consent from DukeStar Technologies
Pvt. Ltd.

S-ar putea să vă placă și