
rpg iv with ile : 000-268 Exam
Test information:
• Approximate # of questions: 92
• Duration in minutes: 120
• Format: Multiple choice
• Required Passing Score: 69%
Related certifications:
• IBM Certified Specialist – i5 iSeries RPG ILE Programmer
Exam Topics Include:
• Externally described files in programs
• Subfiles
• Core RPG
• Advanced RPG techniques
• RPG performance and exception/error handling
• RPG data handling
• RPG problem solving/problem determination
• ILE
1.Review the following sample subfile: ++ | Option Data | | | | | | Record
1 | | | | Record 2 | | |X| Record 3 | | | | Record 4 | ++ The SFLNXTCHG keyword was inactive when Record 1 was written and active when each subsequent subfile record was written. The operator has entered the “X” in the option field for Record 3. Which subfile record will be read when the next READC operation is performed on the subfile?
A.1
B.2
C.3
D.4
Correct:B
2.Given the following code segment: AAN01N02
N03T.Name++++++RLen++TDpBLinPosFunctions++++++++++++++++ A R D1SF SFL A OPTNBR 1A
B 10 3 A SCNDTA 50A O 10 7 A R D1SC SFLCTL(D1SF) A 79 SFLDSP A 81 SFLDSPCTL A SFLSIZ(1000) A SFLPAG(0011) A 9 2′Opt Data What DDS keyword needs to be added to this code segment to remove all of the records from the subfile?
A.SFLCLR B.SFLDLT C.SFLRMV D.SFLINZ Correct:A
3.Given the following code segment: 0001.00 D DateField S D DATFMT(*ISO) 0002.00 D CharField
S 6A INZ(‘040696′) 0003.00 C *MDY MOVE CharField DateField This code will not compile. Which of the following changes will allow a successful compile?
A.Change line 0001.00 to: D DateField S D DATFMT(*MDY) B.Change line 0003.00 to: C *MDY0 MOVE CharField DateField C.Change line 0003.00 to: C *MDY MOVE(D) CharField DateField D.Change line 0003.00 to: C *ISO MOVE CharField DateField Correct:B
4.Given the following code segment: CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq C CODE CASEQ 1 SRONE C CODE CASEQ 2 SRTWO C CAS SRTHREE C END Which of the following code segments will perform the equivalent function?
A./FREE Select CODE; WHEN = 1; ExSr SRONE; WHEN = 2; ExSr SRTWO; Other; ExSr SRTHREE; EndSl; /ENDFREE
B./FREE Select; WHEN CODE = 1; ExSr SRONE; WHEN CODE = 2; ExSr SRTWO; Other; ExSr
SRTHREE; EndSl; /ENDFREE
C./FREE Select CODE; 1; ExSr SRONE; 2; ExSr SRTWO; Other; ExSr SRTHREE; EndSl; /ENDFREE D./FREE Select WHEN CODE; Other; ExSr SRTHREE; EndSl; /ENDFREE
E./FREE Select WHEN CODE; 1; EndSl; /ENDFREE
F./FREE Select WHEN CODE; 1; ExSr SRONE; /ENDFREE G./FREE Select WHEN CODE; 1; ExSr SRONE; 2;
H./FREE Select WHEN CODE; 1; ExSr SRONE; 2; ExSr SRTWO;
I./FREE Select WHEN CODE; 1; ExSr SRONE; 2; ExSr SRTWO; Other; Select WHEN CODE; 1; ExSr
SRONE; 2; ExSr SRTWO; Other; ExSr SRTHREE; EndSl; 1; ExSr SRONE; 2; ExSr SRTWO; Other; ExSr
SRTHREE; EndSl; /ENDFREE ExSr SRONE; 2; ExSr SRTWO; Other; ExSr SRTHREE; EndSl;
/ENDFREE 2; ExSr SRTWO; Other; ExSr SRTHREE; EndSl; /ENDFREE
Correct:B
5.In the following code sample, file CUSSALES contains a record format CUSSALESR, with unique key fields CSCONO, CSCSNO and CSYEAR.
A.The first record with a company greater than 3
B.The first record for company 3, with a customer greater than 100
C.The first record for company 3, customer 100
D.The first record for company 3, customer 100 with a year greater than 2003
Correct:D
6.Given the following expression: SoldAmt + Dividends TotalReturnPct = ( 1 ) *
100 PaidAmt + Commissions Which /free form expression below is correct?
A./free TotalReturnPct = ((SoldAmt + Dividends) / (PaidAmt + Commissions) 1) * 100; /endfree B./free TotalReturnPct = (SoldAmt + Dividends) / (PaidAmt + Commissions) 1 * 100; /endfree C./free TotalReturnPct = (SoldAmt + Dividends / PaidAmt + Commissions 1) * 100; /endfree D./free TotalReturnPct = ((SoldAmt + Dividends) / PaidAmt + Commissions 1) * 100; /endfree Correct:A
7.Given the following code segment: d CusInfo ds dim(10) qualified d CusNum 5 0 d AmtDue 7 2 d
OrdYTD 7 2 d OrdPrv 7 2 How would the AmtDue subfield for the 5th element of the CusInfo array be referenced?
A.AmtDue(5) B.CusInfo(5).AmtDue C.CusInfo.AmtDue(5) D.CusInfo(5).AmtDue(5) Correct:B
8.Given the following code segment:
A.’ OBJA ‘
B.’*libl PGMA ‘ C.’QGPL OBJA ‘ D.’QGPL PGMA ‘ Correct:B
9.Procedure PROC1 in a Service Program must be called passing to it a 5 position field. Which of the following code segments will accomplish this task?
A.D AField S 5A C CallPrc ‘PROC1′ C Parm AField
B.D AField S 5A C Call ‘PROC1′ C Parm AField
C.D Proc1 PR D MyField 5A D AField S 5A C CallP Proc1(AField)
D.D Proc1 PR ExtPgm(‘PROC1′) D MyField 5A D AField S 5A C CallP Proc1(MyField)
Correct:C
10.Given the following field definitions, if field mmddyy contains a date in MDY format, what is the correct syntax to populate DateFld with the content of mmddyy? D mmddyy S 6A D DateFld S D Inz(D’20030627′) DatFmt(*ISO)
A.DateFld = %Date(mmddyy: *MDY); B.DateFld = %Date(mmddyy: *MDY0); C.DateFld = %Date(mmddyy: *ISO); D.DateFld = %Date(mmddyy: *ISO0); Correct:B
11.Given the following DDS for Physical file CATFILE: A R CATREC A CATCOD 5S 0 A CATDES 20A And the following code for Pgm1: FCatFile UF A E K DISK D CategoryRec E DS ExtName(CatFile)
C Read(E) Emp And the following code for Pgm2: FCatFile UF A E K DISK C Read(E) Emp What are the attributes of the CatCod field in both programs?
A.Packed Decimal 5,0 in both programs
B.Signed Numeric 5,0 in both programs
C.Packed Decimal 5,0 in Pgm1; Signed Numeric 5,0 in Pgm2
D.Signed Numeric 5,0 in Pgm1; Packed Decimal 5,0 in Pgm2
Correct:D
12.A program needs to concatenate the 3 numeric fields shown below such that Phone# contains
a string in the format aaabbbcccc, where aaa is the AreaCode field, bbb is the PhPrefix field and cccc is the PhNbr field. All positions of Phone# must be filled with digits. D AreaCode S 3 0 D PhPrefix S 3 0 D PhNbr S 4 0 D Phone# S 10A Which of the following code segments would
correctly accomplish this task in all circumstances?
A.EVAL Phone# = %Char(AreaCode) + %Char(PhPrefix) + %Char(PhNbr)
B.EVAL Phone# = %EditW(AreaCode: ‘0′) + %EditW(PhPrefix: ‘0′) + %EditW(PhNbr: ‘0′) C.EVAL Phone# = %EditC(AreaCode: ‘X’) + %EditC(PhPrefix: ‘X’) + %EditC(PhNbr: ‘X’) D.EVAL Phone# = %Char(AreaCode: ‘0′) + %Char(PhPrefix: ‘0′) + %Char(PhNbr: ‘0′) Correct:C
13.Given the following code segment: DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords++++++++++++ D GetBalDue PR D Balance 11P 2 D CustNo 5S 0 D Qty 7P 0 D Amount 5P 2 D Balance S 11P 2 D CustNo S 5S 0 D OrdQty S 7P 0 D Amt S 5P 2 Which of the following contains correct syntax?
A.C Eval Balance = GetBalDue(CustNo : OrdQty : C Amt) B.C CallP GetBalDue (Balance: CustNo : OrdQty : C Amt)
C.C CallB ‘GetBalDue’ C Parm Balance C Parm CustNo C Parm OrdQty C Parm Amt D.C CallP ‘GetBalDue’ C Parm Balance C Parm CustNo C Parm OrdQty C Parm Amt Correct:B
14.An RPG source member containing subprocedures, will be compiled using the CRTBNDRPG command. What value must be specified for the Default Activation Group parameter? A.DFTACTGRP(*NO)
B.DFTACTGRP(*YES)
C.DFTACTGRP(QILE) D.DFTACTGRP(*NONE) Correct:A
15.CL program PGMA, issues an OPNQRYF statement and then calls RPG program PGMB to process the results of the OPNQRYF. This combination was working until PGMB was recreated to run in a different Activation Group from PGMA. Now PGMB does not see the results of the OPNQRYF statement. Which of the following parameters added to the OPNQRYF statement would allow PGMB to see the correct OPNQRYF results again?
A.OVRSCOPE(*CALLLVL) B.OPNSCOPE(*ACTGRPDFN) C.OVRSCOPE(*ACTGRP) D.OPNSCOPE(*JOB) Correct:D
16.Which of the following code segments show a valid comment within free format calculations?
A./Free * this is a free form comment /EndFree B./Free /* this is a free form comment */ /EndFree C./Free // this is a free form comment /EndFree D./Free / this is a free form comment /EndFree Correct:C
17.Given the following file definitions for a physical file and a logical file: AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions A REF(FLDREF) A R EMPREC A EMPNO R A ENAME R A DEPT R A SALARY R AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions A R EMPRECL PFILE(EMPMST) A EMPNO A DEPT A SALARY A K DEPT A K EMPNO Which fields are accessible through the logical
file and in what sequence will records be presented to the application program?
A.Fields accessible: EMPNO, ENAME, DEPT, SALARY Sequence: EMPNO within DEPT B.Fields accessible: EMPNO, ENAME, DEPT, SALARY Sequence: DEPT within EMPNO C.Fields accessible: EMPNO, DEPT, SALARY Sequence: EMPNO within DEPT
D.Fields accessible: EMPNO, DEPT, SALARY Sequence: DEPT within EMPNO
Correct:C
18.A field is added to the end of the record format of an existing file and the file compiled with
LVLCHK(*NO). What is the impact of this action on an existing RPG program which uses this file
as an externally defined file?
A.Until the RPG program is recompiled, it will halt with a format level check error.
B.The program will run using only the fields that existed when the program was compiled. C.The program will run using all of the fields in the file including the new fields.
D.Until the RPG program is recompiled, it will run but will issue a warning message whenever a record is written or updated.
Correct:B
19.Which of the following code segments shows the correct use of the externally described printer file PRT1 containing record format FMT1? A.FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords FPRT1 O E PRINTER CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result C WRITE FMT1
B.FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords FPRT1 O E PRINTER
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result C EXCEPT FMT1
C.FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords FPRT1 O E PRINTER OFLIND(*IN88) CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result C EXCEPT FMT1
OName++++++DF..N01N02N03Excnam++++B++A++Sb+Sa+ OPRT1 E FMT1 2 6
D.FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords FPRT1 O E PRINTER OFLIND(*IN88) CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result C WRITE FMT1
OName++++++DF..N01N02N03Excnam++++B++A++Sb+Sa+ OPRT1 T FMT1 2 6
Correct:A
20.Given the following code segment: DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++ D Arra s 3s 0
DIM(10) D Index s 2s 0 Inz(0) /FREE For Index = 1 to %Elem(Arra); Arra(Index) = 2 * Index; EndFor;
/ENDFREE What is the value of field Index after the code is run?
A.0
B.22
C.10
D.11
Correct:D
21.Which of the following always reverses the value of indicator 50?
A.C EVAL *IN50 = *IN50
B.C EVAL *IN50 = NOT *IN50
C.C EVAL *IN50 = *IN50 * 1
D.C EVAL *IN50 = %SWITCH(*IN50)
Correct:B
22.Which of the following code segments will fill FLD1 with lowercase x characters?
A.CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq C ‘x’ SubSt
Fld1:*All
B.CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq C *All Move
‘x’ Fld1
C.CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq C Move
*All’x’ Fld1
D.CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq C *Fill Move
‘x’ Fld1
Correct:C
23.Given the following code segment: H DATFMT(*YMD) D Date1 S D INZ(*hival) D Date2 S D DATFMT(*USA ) INZ(D’95/04/30′) D Date3 S D DATFMT(*ISO ) INZ(D’04/03/02′) D Date4 S D DATFMT(*USA ) Which date will the following statement produce? C EVAL Date4 = Date1
%Diff(Date3:Date2:*Y) A.Date4 = ‘12/31/2031′ B.Date4 = ‘31/12/31′ C.Date4 = ‘12/31/9991′ D.Date4 = ‘91/12/31′ Correct:A
24.Given the following code segment: d ByType s n d ByProcess s n d ByData s n Inz d Result s n Inz d Work1 s 8 /FREE ByType = %Len(Work1) > 5; ByProcess = ByType; Result = (ByProcess and ByData) or (ByData and ByType) or (ByType and ByProcess); /ENDFREE What is the value of field Result after the code is run?
A.*off B.*on C.*blank D.*zero Correct:B
25.Given the following code excerpt: OName++++++DF..N01N02N03Excnam++++B++A++Sb+Sa+……. OPRINT D O…………..N01N02N03Field+++++++++YB….++PConstant/Editword/DTfor O INVOICE 10 O AMOUNT
18 O CUSTNUM 25 What do the numbers to the right of the field names specify?
A.The length of the field
B.The ending position where the field will print
C.The beginning position where the field will print
D.The number of spaces to leave before the next field on the print line
Correct:B
26.Named indicator CustFound is to be set on if a record with a key matching CustNo is present in both the InvMast and CustMast files. Which of the following code segments will achieve this? A.Clrn01Factor1+++++++OpCode(ex)Factor2+++++++Result++++++++Len++Dc C CustNo Setll InvMast
C CustNo Setll CustMast C Eval CustFound = %Found(InvMast) and C %Found(CustMast)
B.Clrn01Factor1+++++++OpCode(ex)Factor2+++++++Result++++++++Len++Dc C CustNo Setll InvMast
C CustNo Setll CustMast C Eval CustFound = %Equal(InvMast) and C %Equal(CustMast)
C.Clrn01Factor1+++++++OpCode(ex)Factor2+++++++Result+++++++Len++DcHiLoEq C CustNo Setll
InvMast C eval CustFound = %Found C CustNo Setll CustMast C eval CustFound = CustFound and %Found
D.Clrn01Factor1+++++++OpCode(ex)Factor2+++++++Result+++++++Len++DcHiLoEq C CustNo Setll
InvMast C If %Found C CustNo Setll CustMast C If %Found C Eval CustFound = *ON C EndIf
Correct:B
27.When reading through a file using the READP(E) operation, which of the following logical conditions indicates the beginning of the file has been reached?
A.%Found B.%BOF C.%EOF D.%Error Correct:C
28.The following code segment describes information to be stored for each item. Every item is kept in 5 warehouses, and each warehouse records quantity used by month. d iteminfo ds Qualified d itmnum 15 d stockinfo likeds(warehouse) dim(5) d warehouse ds Qualified d ID 3 d qtyinstock 7 0 d mthlyqtyused 7 0 dim(12) How would RPG refer to the quantity used in the 6th month associated with the 4th warehouse?
A.itemInfo(4).stockinfo(6).mthlyqtyused B.iteminfo.stockinfo.warehouse(4).mthlyqtyused(6) C.iteminfo.stockinfo.qtyinstock(4).mthlyqtyused(6) D.iteminfo.stockinfo(4).mthlyqtyused(6)
Correct:D
29.Given the following code segment: ….DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++ 001 D Myproc PI
3 002 D P1 D 003 D P2 5A 004 D P3 D What is the purpose of the value “3″ specified on line 1?
A.To declare that the third parameter is the return value
B.To declare the number of parameters passed to the subprocedure C.To declare the number of parameters returned by the subprocedure D.To declare the length of the return value for the subprocedure Correct:D
30.An existing application consists of three programs. Program X calls Program A which calls Program B. The application must be changed so that the three programs become a single program (Z) using bind by copy. The CALL operations to A and B have been changed to CALLBs and the modules X, A and B have been created. These three modules are listed in the binding directory MYBNDDIR. Which of the following commands will create the bound program Z? A.CRTPGM PGM(Z) BNDDIR(MYBNDDIR) ENTMOD(X)
B.CRTBNDRPG PGM(Z) BNDDIR(MYBNDDIR)
C.CRTPGM PGM(Z) MODULE(X) BNDDIR(MYBNDDIR) D.CRTBNDRPG PGM(Z) BNDDIR(MYBNDDIR) ENTMOD(X) Correct:C
Testking ibm 000-268 Interactive Testing Engine Included!
92 Questions
Updated : 09/18/2008
Price : $87.99 $79.99
Free down:Testking ibm 000-268
Free down:Pass4sure ibm 000-268
| IBM Free Downloads |
|
Type |
Exam Bible | New Questions & Answers |
Latest Updated |
Download link |
![]() |
All Ibm 's Exam Pack |
767 |
1 days ago | Download |
If you would like to make a comment, please fill out the form below.
[...] Network Deployment V6.1, Core Administration Testking 000-266 Exam : AS/400 RPG IV Programmer Testking 000-268 Exam : i5 iSeries RPG ILE Programmer Testking 000-331 Exam : Power Systems Sales for AIX and Linux [...]
[...] testking 000-268 [...]