Sei sulla pagina 1di 38

000-268

i5 iSeries RPG ILE Programmer

Version 1.0

Real-Questions.com
000-268 2

Study Tips
This product will provide you questions and answers carefully compiled and written by our
experts. Try to understand the concepts behind the questions instead of cramming the
questions. Go through the entire document at least twice so that you make sure that you are
not missing anything.

Important Note:
Please Read Carefully

This Real-Questions.com exam has been carefully written and compiled by Real-
Questions.com experts. It is designed to help you learn the concepts behind the questions
rather than be a strict memorization tool. Repeated readings will increase your
comprehension.

We continually add to and update our exams with new questions, so check that you have the
latest version of this exam right before you take your exam.

For security purposes, each PDF file is encrypted with a unique serial number associated
with your Real-Questions.com account information. In accordance with International
Copyright Law, Real-Questions.com reserves the right to take legal action against you should
we find copies of this PDF file has been distributed to other parties.

Please tell us what you think of our exam. We appreciate both positive and critical comments
as your feedback helps us improve future versions.

We thank you for buying our product and look forward to supplying you with all your
Certification training needs.

Good studying!

Real-Questions.com Technical and Support Team

Real-Questions.com
000-268 3

Q.1
Given the code segment,
/FREE
Monitor;
Read filel;
If Not %Eof (Filel);
Line = %subst (Line (1): %Scan (‘***’: Line(i) ) +1);
EndIf;
On-Error 1211; //File not open
ExSr FileNotOpen;
On-Error *File; //Other file errors
ExSr FileErrors;
EndMon;
Return;
/END-FREE
If the Read reached end-of-file, which of the following lines of code will be run?

A. ExSr FileNotOpen;
B. ExSr FileErrors;
C. Line = %Subst(Line (1): %Scan(‘***’: Line(i)) +1);
D. Return;

Ans. D
Q.2
Assume the user enters an order number into filed Order# which exists in both
YtdP900A. Give the following code segment, which subroutine (s) will be run?
D ExitRequest S N Inz

/Free

DoU ExitRequest;
ExFmt OrderInq;
Chain Order# Ytd900A;
Chain Order# HstP900A;
Select;
When % Found (YtdP900A);
ExSrYtdFound;
When % Found (YtdP900A);
ExSr Hstfound;
When % Found (YtdP900A) and % Found (HstP900A);
ExSr BothFound;
Other;
ExSr NotFound;
EndSI;
EndDo;
/END-FREE

Real-Questions.com
000-268 4

A. YtdFound only
B. HstFound only
C. BothFound only
D. YtdFound, HstFound and BothFound

Ans. A
Q.3
What command will bind multiple *MODULE objects together to create a *PGM
object?

A. CRTPGM
B. CRTRPGMOD
C. CRTRPGPGM
D. CRTBNDPGM

Ans. A

Q.4
Give the following code:
DName+++++++++++ETDsFrom+++To/L+++IDc. Keywords++++++++++++++++++++
D ary S 5 Dim(4) Ascend
Dx S 2 0 Inz(1)

C Eval ary(1)
= ‘Tom’
C Eval ary(2)
= ‘Dick’
C Eval ary(4)
= ‘Harry’
C SourtA ary

C*ONOIFavtorl+++++++Opcode (E)
+Factor2+++++++Recult+++++++Len++D+HiLoEq
C ‘Jim’ LOOKUP ary(x)
9999
Which of the following is correct as the result of running the code?

Real-Questions.com
000-268 5

A. %found = *OFF, %Equal = *OFF, x=3


B. %found = *ON, %Equal = *OFF, x=3
C. %found = *ON, %Equal = *OFF, x=4
D. %found = *OFF, %Equal = *OFF, x=4

Ans. B
Q.5
Which of the following represents the sequence of embedded SQL statements required
to extract multiple records based on criteria that are not known at compile time?

A. DECLARE cursor, EXECUTE statement, OPEN cursor, FETCH row(s),


CLOSE cursor
B. PREPARE statement, DECLARE cursor, OPEN cursor, FETCH row(s),
CLOSE cursor
C. DECLARE cursor, OPEN cursor, SELECT row(s), CLOSE cursor
D. PREPARE statement, EXECUTE statement, SELECT row(s), FETCH
row(s), DROP table

Ans. B

Q.6
Give the following RPG IV file specifications:
FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords
FFILE1 UF A E DISK
FFILE2 UF E A DISK
FFILE3 UF E DISK
FFILE4 UF E DISK
UPDROP*ADD)
Which file will allow the WRITE operation to be used?

A. FILE1
B. FILE2
C. FILE3
D. FILE4

Ans. A

Q.7
Given the following character filed:
D Cher_Date S 10A Inz(‘03/19/1954’)
Which of the following statement is used to test that the filed contains a valid data value?
O0
A. ClrNOlFactorl+++++++Opcode
(E)+Factor2+++++++Result+++++++Len ++D+HiLoEq
C *MDY TEST(DE) Char_Date
B. ClrNOlFactorl+++++++Opcode
(E)+Factor2+++++++Result+++++++Len ++D+HiLoEq
C *USA TEST(D) Char_Date 19

Real-Questions.com
000-268 6

C. ClrNOlFactorl+++++++Opcode
(E)+Factor2+++++++Result+++++++Len ++D+HiLoEq
C *MDY TEST(D) Char_Date 19
D. ClrNOlFactorl+++++++Opcode
(E)+Factor2+++++++Result+++++++Len ++D+HiLoEq
C *USA TEST(D) Char_Date

Ans. D

Q.8
Given the following code segment:
FFilename++ipEASF…..L…..A.Device+.Keywords+++++++++++++++++++++++++
FCuseMast IF E K Disk UsrOpn

CLCONOLFactorl+++++++Opcode&ExtFactor2+++++++Result+++++++Len++D+HiL
oEq
C CustKey ReadE(E) CustMast
Which of the following will cause %Error to be set on when the Read is run?

A. The CUSTMAST file is empty


B. The CUSTMAST file has not been opened
C. The CUSTMAST file has reached end-of-file
D. The CUSTMAST file has no index (key fields) associated with it
Ans. B
Q.9
File ORDMAS contains order and has the field CUST# which is the key to file
CUSMAS01. File CUSMAS01 contains ONLY customers on credit hold. Given the
following code segment:
FFilename++IPEASFRlen+Klen+AIDevices+.Keywords++++++++++++++++++++++++
+C
FCUSMAS01 IF E K Disk
FORDMAS IF E K Disk
/Free
Chain ORDER# ORDMAS;
SetLL(E) CUST# CUSMAS01;
/End-Free
Following the SetLL operation, which logical condition indicates an order for a
customer that is on credit hold?

A. %Found(CUSMAS01)
B. %Equal(CUSMAS01)
C. Not %Found(CUSMAS01)
D. Not %Error

Ans. B
Q.10
Given the following code segment:

Real-Questions.com
000-268 7

DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords++++++++++++++++++++
+++++
D Date6N S 6 0
D DateISO S D Inz(D ‘2004-10-25’)Datfmt(*150)
CLONOIFactor+++++++Opcode
(E)+Factor2+++++++Result+++++++Len++D+HiLoEq. . .
C *mdy Move DateISO Date6N
Which of the following statements is the /Free from equivalent to the move operation?

A. Move DateISO(Date6N:*mdy);
B. Date6N = %Dec(DateISO:*mdy);
C. Date6N = %Dec(DateISO);
D. Date6N = %Dec(DateISO:6:0);

Ans. B
Q.11
An API’s documentation indicates a required parameter of type BINARY, length 4.
How should this parameter be coded in a prototype?

A. DName +++++++++++EDTsFrom +++To/L+++IDC.


Keywords+++++++++++++++++++++++++
d Parml 10i 0
B. DName +++++++++++EDTsFrom +++To/L+++IDC.
Keywords+++++++++++++++++++++++++
d parml 10 0
C. DName +++++++++++EDTsFrom +++To/L+++IDC.
Keywords+++++++++++++++++++++++++
d parml 4b 0
D. DName +++++++++++EDTsFrom +++To/L+++IDC.
Keywords+++++++++++++++++++++++++
d Parml 7P 0

Ans. A

Q.12
In the following code segment, file CustMast contains a record format CustMastR.
fCustMast uf e k disk
d CustDs e
/ free
dou %eof (CustMast);
read CustMastR CustDs;
………………
enddo;
/end-free
Which of the following keywords must be added to the definition of CustDs to allow for
successful compilation?

A. extname(CustMast)
B. likerec(CustMastR)

Real-Questions.com
000-268 8

C. likerec(CustMast)
D. extname(CustMastR)

Ans. A
Q.13
Give the following code segment;

H DATFMT(*YMD)
D Date1 s D INZ(D’25/10/30’)
D Date2 s D DATFMT(*MDY-) INZ(D’25/10/30’)
D Date3 s D DATFMT(*USA) INZ(D’25/10/30’)
D Date4 s D DATFMT(*ISO) INZ(D’25/10/30’)
After initialization which of the following is correct?

A. Date2 has value of ‘10/30/25’


B. Date4 has value of ‘2025-10-30’
C. Date1 has value of ’25-10-30’
D. Date3 has a value of ‘10/30/1925’

Ans. B

Q.14
An RPG source (PGMA) contain two subprocedures and no H-specs. It is company
policy that such ILE programs should NEVER be allowed to run the Default Activation
Group. Which of the following commands should be used to create the programs?

A. CRTBNDRPG PGM (PGMA)……DFTACTGRP(*YES) ACTGRP(QILE)


B. CRTBNDRPG PGM (PGMA)……DFTACTGRP(*YES)
C. CRTBNDRPG PGM (PGMA)……DFTACTGRP(*NO) ACTGRP(QILE)
D. CRTBNDRPG PGM (PGMA)……DFTACTGRP(*NO)
ACTGRP(*CALLER)

Ans. C
Q.15
A subfile program will be written to process a maximum of 200 records. Fast response
time while scrolling through the subfile is critical. How should the subfile be designed?

A. Subfile page = 10
Subfile Size = 10
B. Subfile page = 10
Subfile Size = 200
C. Subfile page = 200
Subfile Size = 10
D. Subfile page = 200
Subfile Size = 200

Ans. B

Real-Questions.com
000-268 9

Q.16
Named indicator CustFound in to be set on if a record with a key matching CustNo is
present in both the InzMast and CustMast files. Which of the following code segment
code segments will achieve this?

A. Clrno01Factor1+++++++OpCode (ex)
Factor2+++++++Result+++++++Len++Dc
C CustNo Set11 InvMast
C CustNo Set11 CustMast
C Eval CustFound = %Found(InvMast) and
C
%Found(CustMast)
B. Clrno01Factor1+++++++OpCode (ex)
Factor2+++++++Result+++++++Len++Dc
C CustNo Set11 InvMast
C CustNo Set11 CustMast
C Eval CustFound = %Found(InvMast) and
C
%Equal(CustMast)
C. Clrno01Factor1+++++++OpCode (ex)
Factor2+++++++Result+++++++Len++DcHiLoEq
C CustNo Set11 InvMast
C eval CustFound = %Found
C CustNo Set11 CustMast
C eval custFound = CustFound and %Found
D. Clrno01Factor1+++++++OpCode (ex)
Factor2+++++++Result+++++++Len++DcHiLoEq
C CustNo Set11 InvMast
C eval %Found
C CustNo Set11 CustMast
C If %Found
C Eval CustFound = *ON
C EndIf
C EndIf

Ans. B

Real-Questions.com
000-268 10

Q.17
Give the following prototype and field definitions:

……DName+++++++++++ETDsFrom+++To/L+++IDc. Keywords++++++++++……..
D TestProgram pr Extpgm(‘TESTPGM’)
D CustName 30a

D Customer20 s 20a
D Customer30 s 30a
D Customer40 s 40a
…..CLONO1FA CTOR1+++++++Opcode (E) +Extended-factor2+++++++++++……..
C callp
TestProgram(???????????)
Which of the following field would be REJECTED by the compiler as a parameter on
the call?

A. Customer20
B. Customer30
C. Customer40
D. Both Customer20 and Customer40

Ans. A

Q.18
Which of the following RPG constructs can be used to returned the user ID of the user
running the program?

A. PSDS (Program Status Data Structure)


B. INFDS(File Information Data Structure)
C. %USER (Retrieve User ID Built-in Function)
D. %JOBINF (Retrieve Job Information Built-in Function)

Ans. A

Q.19
Give the following code segment:
DName+++++++++++EDTsFrom+++To/L+++IDc.Keywords++++++++++++++++++++
+++
D DS
D Name 40A INZ(‘IBM Corporation’)
D Part1 15 overlay(Name)

Real-Questions.com
000-268 11

D Part2 overlay(Name;*next)
like(Part1)
What are the characteristics of the Part2 field?

A. A 25 position character field initialized to blanks


B. A 15 position character field initialized to blanks
C. A 15 position character field initialized to “IBM Corporation”
D. A 25 position character field initialized to “IBM Corporation”

Ans. B
Q.20
Give the following code segment:
DName+++++++++++ETDsFrom+++To/L+++IDc.
Keywords++++++++++++++++++++++
D Arr s 15a DIM (5) INZ
D Index s 2s 0 Inz (0)

/FREE
arr (1) = ‘RPG is Cool’;
arr (2) = ‘ RPG is Coll’;
arr (3) = ‘ RPG is Cool’;
arr (4) = ‘ RPG is Cool’;
Index = % LookUp(*blank: arr: 1:2);
/END-FREE
What is the value of field Index after the code is run?

A. 0
B. 1
C. 2
D. 5

Ans. A

Q.21
An employee words forty or more hours in a pay period. Assuming that overtime is paid
for hours greater than 40 hours at a rate of time and a half, which EVAL statement will
calculate the gross pay (GPay)?

A. EVAL GPay = Prate *HrsWrkd* 1.5


B. EVAL GPay = Prate *40 + (HrsWrkd-40)* Prate* 1.5
C. EVAL GPay = Prate *40 + (HrsWrkd-40)* Prate* 0.5
D. EVAL GPay = Prate *HrsWrkd + (HrsWrkd-40)* Prate* 1.5
Ans. B
Q.22
Give the following code segment:
d GetAcctBal pr 11 2
d AcctNum 7 0
d Year 4s 0
d Period 2s 0
The identifiers AcctNum, Year and Period are used for what purpose?

Real-Questions.com
000-268 12

A. For documentation only


B. To identify the name of work fields to be used in the subprocedure
C. To define the field names being passed on the call to the subprocedure
D. To endure the parameter names in the prototype match those in the
procedure interface
Ans. A
Q.23
An existing application consist 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)MODUL(X) BNDDIR (MYBNDDIR)
D. CRTBNDPRG PGM(Z) BNDDIR (MYBNDDIR) ENTMOD (X)
Ans. C
Q.24
A program uses a display file with the format SCR01 to retrieve the customer name for
a supplied customer number. A user starts the program and does the following:
1. Sets the screen value of SCCUS# to 125 and presses the enter key.
2. Change the screen value of SCCUS# to 153 and presses the F3 key.
Given the following display file definition segment:
A R SCR01
A CA03 (03)
A SCCUS# 5 OB 11 15
A SCNAME 30 0 11 21
After F3 was pressed, what is the value of SCCUS#?

A. 0
B. 125
C. 153
D. *null

Ans. B
Q.25
Give the following code segment:
d CustInfo ds dim (10) qualified
d CustNum 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. CustInfo(5). AmtDue
C. CustInfo.AmtDue(5)
D. CustInfo(5). AmtDue(5)

Real-Questions.com
000-268 13

Ans. B

Q.26
Given the following display file DDS example:
ANNO1N02N03T. Name+++++++RLen++TDpBLinPosFunctions+++++++
A SFLRCD 4S OH SFLRCDNBR
(CURSOR)
What is the use of the variable SFLRCD?
A. When control is returned to the program, SFLRCD will be set to the
number of subfile records that have been changed.
B. When control is returned to the program, SFLRCD will be set to the
relative record number where the cursor is currently located.
C. When displaying the subfile, the subfile record with the relative record
number equal to SFLRCD will be the first subfile line displayed.
D. When displaying the subfile, the cursor will initially be positioned on the
subfile record with the relative record number equal to SFLRCD.
Ans. D
Q.27
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 field 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’) +
%ERditC(PhPrefix: “X”) + %EditC(PhNbr: ‘X’)
D. EVAL PHONE# = %Char(AreaCode: ‘0’) = %Char(PhPrefix:
‘0’) + %Char(PhNbr: ‘0’)
Ans. C
Q.28
A Service Program needs to be created without using Binder Language.
Module A contains a procedure named A.
Module B contains a procedure named B.
Module C contains procedures named C1 and C2.
All four of the procedures are to have their names exported. Which of the following
commands will accomplish this?

Real-Questions.com
000-268 14

A. CRTSRVPGM SRVPGM(MYSRVPGM) MOOSULE(ABC)


EXPORT(*SRCFILE)
B. CRTSRVPGM SRVPGM(MYSRVPGM) MOOSULE(ABC) EXPORT(A B
C1 C2)
C. CRTSRVPGM SRVPGM(MYSRVPGM) MOOSULE(ABC)
EXPORT(ALL)
D. CRTSRVPGM SRVPGM(MYSRVPGM) MOOSULE(ABC)
EXPORT(NOSRCFILE)
Ans. C
Q.29
Given the following code segment:
DName+++++++++++ETDsFrom+++To/L+++IDc.
Keywords++++++++++++++++++++++
D AmtChar S 10 Inz(‘123456789’)
D TaxPct S 3 3 Inz(.055)
D Tax S 8 2

C Eval Tax = %Dec(AmChar:


10: 2) * TaxPct
If the Eval statement were to be run, what error would occur?

A. Data Decimal error


B. Intermediate result is too small for receiver
C. Result is too small receiver
D. Invalid characters in character to numeric conversion function

Ans. B

Q.30
Given the following code segment, what value will be displayed as a result of the last
statement?
D DayNamesData DS
D 9
INZ(‘Saturday’)
D 9
INZ(‘Sunday’)
D 9
INZ(‘Monday’)
D 9
INZ(‘Wednesday’)
D 9
INZ(‘Thursday’)
D 9
INZ(‘Friday’)
D 9
INZ(‘Saturday’)
D 9
INZ(‘Sunday’)

Real-Questions.com
000-268 15

D pDayNames S *
INZ(%Addr(DayNamesData))
D DayName S 9 Dim(7)
BASED (pDayNames)
/Free
Eval pDayNames = %Addr(DayName(2));
Dsply DayName(3); //Display name of day 3
A. Monday
B. Tuesday
C. Wednesday
D. Thursday
Ans. B

Q.31
Given the following expression:
SoldAmt + Dividends
TotalReturnPct = (----------------------------- -1)*100
PaidAmt + commissions
Which /free from expression below is correct?
A. /free
TotalReturnPct =
((SoldAmt + Dividends) /(PaidAmt + Commissions) -1) *100;
/end-free
B. /free
TotalReturnPct =
(SoldAmt + Dividends) /(PaidAmt + Commissions) -1) *100;
/end-free
C. /free
TotalReturnPct =
(SoldAmt + Dividends /PaidAmt + Commissions) -1) *100;
/end-free
D. /free
TotalReturnPct =
((SoldAmt + Dividends) /PaidAmt + Commissions) -1) *100;
/end-free

Real-Questions.com
000-268 16

Ans. A
Q.32
Given the following code segment (Note that the field “Hours” is assumed to be defined
in a database used by the program):
DName+++++++++++ETDsFrom+++To/L+++IDc.
Keywords++++++++++++++++++++++
D MonHrs DS
D AverageHrs 4 2
D Employees 2 0
D TotalHours 7 2
C Eval Empolyees += 1
C Eval TotalHours = TotalHours + Hours
C Eval AverageHrs = TotalHours / empyees
An error occurs when executing this code. Which of the following would correct the
error?
A. Initialize the AverageHrs field to zero
B. Add half-adjust to the third Eval statement
C. Increase the size of the AverageHrs field
D. Code the Inz keyword for the DS
Ans. D
Q.33
A legacy application database file contains a pair of zoned, six digit fields called
ORDDAT and DUEDAT, which contain the date in MMDDYY format. Which of the
following expressions would update the DUEDAT field with a value representing 30 days
after the date in ORDDT.

A. duedat = %date(ordat:*mdy)+%days(30);
B. duedat = %dec(%date(ordat:*mdy)+%days(30));
C. duedat = %dec(%date(ordat:*mdy)+%days(30): *mdy);
D. duedat = %dec((%date(ordat:*mdy)+%days(30)):*mdy);

Ans. C
Q.34
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)dime(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. itminfo(4).stockinfo(6).mthlyused
B. iteminfo.stockinfo.warehouse(4).mthlyused(6)
C. iteminfo.stockinfo.qtyinstock(4).mthlyused(6)
D. iteminfo.stockinfo(4).mthlyqtyused(6)
Ans. D

Real-Questions.com
000-268 17

Q.35
Which of the following pieces of information can be found in a trigger buffer?
A. The name of the logical file member being processed
B. The name of the file and the User profile of the job which caused the trigger
to file
C. Name of the physical file member being processed
D. Name of the record format being processed
Ans. C
Q.36
Given the following code segment:
/FREE
DoU %EoF(Filel);
Read Filel;
*IN90 = %EoF
*IN90 = *OFF
EndDo;
/END-FREE
How many times will the code inside of the DoU loop be run if File 1 contains no
records?
A. 0
B. 1
C. 2
D. indefinitely
Ans. B
Q.37
Which of the following code segments shows the correct use of the externally described
printer file prt1 containing record format FMT1?
A. FFilename++IPEASFRlen+AIDevices+.Keywords
FPRTI O E PRINTER
CLON01Factor1+++++++Opcode (E)+Factor2+++++++Result
C WRITE FMT1
B. FFilename++IPEASFRlen+AIDevices+.Keywords
FPRTI O E PRINTER
CLON01Factor1+++++++Opcode (E)+Factor2+++++++Result
C EXCEPT FMT1
C. FFilename++IPEASFRlen+AIDevices+.Keywords
FPRTI O E PRINTER OFLINE (*IN88)
CLON01Factor1+++++++Opcode (E)+Factor2+++++++Result
C EXCEPT FMT1
OName+++++++DF..NO1NO2NO3Excnam++++B++A++Sb++Sa+
OPRT1 EFMT1 2 6
D. D. FFilename++IPEASFRlen+AIDevices+.Keywords
FPRTI O E PRINTER OFLINE (*IN88)
CLON01Factor1+++++++Opcode (E)+Factor2+++++++Result
C WRITE FMT1
OName+++++++DF..NO1NO2NO3Excnam++++B++A++Sb++Sa+
OPRT1 EFMT1 2 6
Ans. A
Q.38

Real-Questions.com
000-268 18

A program is created from two *MODULE objects:MYMODB. What type of cell is


being performed when a procedure in MYMODA calls a procedure in MYMODB?

A. Bound call by copy


B. Dynamic call by copy
C. Bound call by reference
D. Dynamic call by reference

Ans. A
Q.39
Give the following code segment:
D MyProoc PR 5P 0
D Region 2A CONST
D Customer 7P 0 OPTIONS(*NOpass)

D Region S 1A
D Rgn S 2A
D MarkUp S 5P
0
D rtnValue S 7p
Which of the following is a correct way to call MyProc?

A. Eval RtnValue = MyProc(Region)


B. Eval MarkUp = MyPro(Rgn:1234567)
C. Eval RnValue = MyPro(‘AB’:1234567)
D. Eval MarkUp = MyProc(Rgn:*NoPass)

Ans. A

Q.40
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

Real-Questions.com
000-268 19

D CustNo S 5S 0
D OrdQty S 7P 0
D Amt S 5P 2
Which of the following contains corrects syntax?

A. C Eval Balance =
GetBalDue(CusNo : 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

Ans. A

Q.41
CL Program PGMA, Issues an OPNQRYF statement and then calls PRG Program
PGMB to process the result of the OPNQRYF. This combination was working unit
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. OVRCOPE(*CALLLVL)
B. OVRCOPE(*ACTGRPDFN)
C. OVRCOPE(*ACTGRP)
D. OVRCOPE(*JOB)
E.
Ans. D

Q.42
Given the following code segment:
d ByType s n
d ByProcess s n
d ByData s n Inz
d Result s n Inz

Real-Questions.com
000-268 20

d Workl s 8

/FREE

ByType = %Len(Workl) >5;


ByProcess = ByType;

Result = (ByProcess and ByData) or (ByData and ByType)


Or(ByType and ByProcess);
/END-FREE
What is the value of field Result after the code is run?

A. *off
B. *on
C. *blank
D. *zero

Ans. B
Q.43
Given the following ode segment:
d Mypdm pr extpgm(‘MYPGM’)
d CustName 20
Which of the following keywords, if added to parameter CustName, would allow an
expression to be passed?

A. CONST
B. VALUE
C. OPTIONS(*STRING)
D. STATIC

Ans. A
Q.44
A Service Program was originally created with the following binder language:
STRGMEXP PGML(*CURRENT)
EXPORT SYMBOL(‘A’)
EXPORT SYMBOL(‘B’)
ENDPGMEXP
Module C is to be added to the Service Program. It is a NOMAIN module containing
two subprocedures –X and Y.
Which of the following binder sources could be used to ensure that existing programs
which use this service program, continue to work correctly without being recreated or
updated?
A. STRGMEXP PGMLVL(*CURRENT)
EXPORT SYMBOL(‘A’)
EXPORT SYMBOL(‘B’)
EXPORT SYMBOL(‘X’)
EXPORT SYMBOL(‘Y’)
ENDPGMEXP
B. STRGMEXP PGMLVL(*CURRENT)
EXPORT SYMBOL(‘A’)

Real-Questions.com
000-268 21

EXPORT SYMBOL(‘B’)
EXPORT SYMBOL(‘X’)
EXPORT SYMBOL(‘Y’)
ENDPGMEXP
STRGMEXP PGMLVL(*PRV)
EXPORT SYMBOL(‘A’)
EXPORT SYMBOL(‘B’)
ENDPGMEXP
C. STRGMEXP PGMLVL(*CURRENT)
EXPORT SYMBOL(‘A’)
EXPORT SYMBOL(‘B’)
EXPORT SYMBOL(‘C’)
ENDPGMEXP
STRGMEXP PGMLVL(*PRV)
EXPORT SYMBOL(‘A’)
EXPORT SYMBOL(‘B’)
ENDPGMEXP
D. STRGMEXP PGML(*CURRENT)
EXPORT SYMBOL(‘X’)
EXPORT SYMBOL(‘Y’)
EXPORT SYMBOL(‘A’)
EXPORT SYMBOL(‘B’)
ENDPGMEXP
EXPORT SYMBOL(‘A’)
EXPORT SYMBOL(‘B’)
ENDPGMEXP
Ans. B
Q.45
In the following code sample, file CUSSALES contain a record format CUSSALESR,
with unique key fields CSCONO, CSCSNO and CSYEAR.
Fcussales if e k disk
d keycus e ds extname(cussales:*key)
/free
cscono = 3; //company
cscono = 100; //customer
csyear =2003; //year
setgt %kds(keycus) cussalesr;
reade %kds(keycus: 2) cussalesr;
/end-free
Assuming the READE operation is successful, which record is retrieved?
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

Ans. D

Q.46
Given the RPG IV Definition Specification:
D Datain S 6 2 CTDATA DIM(100)PERRCD(3)

Real-Questions.com
000-268 22

Which of the following describes how Dataln is defined?

A. Dataln is defined as a run-time array


B. Dataln is defined as a compile-time array
C. Dataln is defined as a compile-time table
D. Dataln is defined as a run-time table

Ans. B
Q.47
Procedure PROC1 in a Service Program must be called passing to it a 5 position field.
Which of the following code segment 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
D AField s 5A
C Ca11P Procl(AField)
D. D Proc1 PR
ExtPgm(‘PRC1’)
D MyField 5A
D AField s 5A
C Ca11P Procl(AField)

Ans. C
Q.48
Which of the following always reverse 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)
Ans. B
Q.49
Given the following DDS for Physical file CATFILE:
A R CATREC
A CATREC 5S 0

And the following code for Pgm1:


FCatFile UF A E
D CategoryRec E DS
C Read(E) Emp
And the following code for Pgm2:

Real-Questions.com
000-268 23

Fcatfile UF A E Kdisk
C Read(E) Emp
What are the attributes of the CatCod field in both programs?

A. Packed Decimal 5,0 in both programs


B. Signal 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

Ans. D
Q.50
An RPG program encounters an error. The programmer tries to match the statement
number by reported by the error message with the source and discovers that statement.
Clearly this is statement is error.
Which of the following can be coded in the h-Spec to ensure that run time errors
reference statement numbers that correspond to those in the source member?

A. Option(*List)
B. Option(*Stmt)
C. Option(*NoDebuglo)
D. Option(*SrcStmt)

Ans. D

Q.51
What keyword must be added to the specification to process data from a different file
that has the same format as the one declared in the file specification without performing
a specific file override?

A. ExtFile
B. OvrDbf
C. OvrFile
D. ExtDbf

Ans. A
Q.52
A field is added to the end of the record format of an existing file compiled with
LVLCHK(*NO). What is the impact of this action on an existence RPG program which
uses this file as an externally defined file?

A. Until the RPG program is recompiled, it will half with format level check
error.
B. The program will run using only the fields that existed when the program
was compiled.

Real-Questions.com
000-268 24

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 writing
message whenever a record is written or updated.

Ans. B
Q.53
An RPG source member containing subprocedure, 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)

Ans. A

Q.54
Given the following Header specification:
H DATFMT(*USA)
A date field needs to be initialized to March 19, 1954. Which of the following Definition
specifications declares a value date field with this value?
A. D BDay s D
INZ(‘03/19/1954’)
B. D BDay s D INZ(‘1954-
03-19’) DATFMT(*ISO)
C. D BDay s D
INZ(D’03/19/1954’) DATFMT(*ISO)
D. D BDay s D
INZ(D’1954-03-19’) DATFMT(*ISO)
Ans. C
Q.55
The task is to create a service program form the PRG module A and B.
Module A contains a main procedure named A.\
Module B is a NOMAIN module containing the subprocedures X and Y.
Which of the following binder language source examples could be used to create the
services program?
A. STRPGMEXP PGMLVL(*CURRENT)
EXPORT SYMBOL(*ALL)
ENDPGMEXP
B. STRPGMEXP PGMLVL(*CURRENT)
EXPORT SYMBOL(‘A’)
EXPORT SYMBOL(‘B’)
EXPORT SYMBOL(‘X’)
EXPORT SYMBOL(‘Y’)
ENDPGMEXP
C. STRPGMEXP PGMLVL(*CURRENT)

Real-Questions.com
000-268 25

EXPORT SYMBOL(‘A’)
EXPORT SYMBOL(‘B’)
ENDPGMEXP
D. STRPGMEXP PGMLVL(*CURRENT)
EXPORT SYMBOL(‘A’)
EXPORT SYMBOL(‘X’)
EXPORT SYMBOL(‘Y’)
ENDPGMEXP
Ans. D
Q.56
Which of the following code segments show a valid comment within free format
calculations?

A. /Free
*this is a free from comment
/End-Free
B. /Free
*this is a free from comment */
/End-Free
C. /Free
//this is a free from comment
/End-Free
D. /Free
/this is a free from comment
/End-Free

Ans. C
Q.57
What is the following code accomplishing?
Eval X=X**MONTH

A. X is raised to the power of month


B. X is multiplied by MONTH
C. X is multiplied by MONTH, then multiplied by MONTH again
D. X will contain the numeric month value

Ans. A
Q.58
Which of the following RPG IV operations will output a display file format on the screen
and continue processing without waiting for a user response?

A. WRITE
B. EXFMT
C. DSPLY
D. EXCEPT

Ans. A

Q.59
Given the following code segment:

Real-Questions.com
000-268 26

D TexCalc PR EXTPGM(‘MYPGM’)
D Parml 5p 0 CONST
D parm2 10A
OPTIONS(*NOPASS)
What is the purpose of the keyword OPTIONS(*NOPASS)?

A. The parameter is optional


B. The parameter will accept the special value *OMIT
C. If the parameter’s value is changed by MYPGM, the caller will not see the
new value.
D. The parameter cannot be modified by the called program

Ans. A
Q.60
While stepping through a program in debug mode, a programmer discover that after a
CHAIN operation, it is necessary to press the step key multiple times before reaching the
text executable instruction. Which of the following H specification keywords can be used
to avoid generation these additional breakpoints?

A. H OPTION(*NOFILEIO)
B. H DEBUG(* NODEBUGIO)
C. H DEBU(*NOFILEIO)
D. H OPTION(*NODEBUGIO)

Ans. D
Q.61
What system API can be used to place a message in a subfile program message queue
from within an RPG program?

A. QSFLMSG
B. QSNDMSG
C. QMHSNDPM
D. QSNDSFLM
Ans. C

Q.62
What PRG construct allows the complier to validate the size and type of the parameters
passed on a program call?

A. An *ENTRY PLIST
B. A Prototype
C. A Procedure interface
D. The %PARMS built-in function

Ans. B
Q.63

Real-Questions.com
000-268 27

In An RPG program with embedded SQL, which of the following indicates that a
FETCH statement was attempted, but the cursor was positioned after the last row of the
result set?

A. SQLCOD = 100
B. SQLSOD < 0
C. SQLEOF = *ON
D. SQLRRR

Ans. A
Q.64
Given the following code segment:
HKeywords++++++++++++++++++++++++++++++++++++++++++
H DatFmt(*YMD)
Dname++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++
D Date1 s D
D Date2 s 7p 0 INZ(90895)
CLONOFactor1+++++++Opcode (E)+Extended-Factor
2+++++++++++++++++++++++++++++++++++++++++++
C Eval Date1 = %Date(Date2: *MDY)
What is the value of the field Date1 after the EVAL operation is performed?
A. ‘95/09/08’
B. ‘09/08/95’
C. ’95-09-08’
D. ‘1995-09-08’
Ans. A
Q.65
File CustFile Contains a record format CustR, with a single key field Custnumber.
Given the following code segment:
FFilename++IPEEASF……L……A.Devices+.
Keywords++++++++++++++++++++++++++
FCustFile if e k disk
Dname+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++
++++++
In/Free format, which of the following CHAIN operations will retrieve the customer
record for the Customer number in field Cust#?
A. Cust# Chain CustFile;
B. Chain CustFile Cust#;
C. Chain Cust# CustFile;
D. Cust#Chain CustR;
Ans. C
Q.66
An application needs to check for the following condition:
Amount due (AMTDUE) is greater than 1000 and their region code (RGNCODE) is 12
or credit limit (CRLIMIT) is greater than 1000.
Which of the following code segments meets this requirement?
A. If (AmtDue >1000 and RgnCode = 12)or CrLimit >1000
B. If AmtDue >1000 and (RgnCode = 12)or CrLimit >1000)
C. If AmtDue >1000 and RgnCode = 12or CrLimit >1000
D. If (AmtDue >1000 and (RgnCode = 12)or CrLimit >1000)

Real-Questions.com
000-268 28

Ans. B
Q.67
Given the following procedure interface:
d PrintSales pi
d Company 2 0 value
d Customer 10 0 value
d Year 4 0 value
d Month 2 0
options(*nopass)
Which test must be performed to ensure proper referencing of the Month parameter?
A. if Month < > *null;
B. if %addr (Month)< > *null;
C. if %parms = 4;
D. if Month > 0;
Ans. C
Q.68
APP01 is a program consisting of modules A and B which will call procedures X and Y
from a Service Program named UTILIES. Which of the following Binding Directories
contains the information required to successfully create APP01 using the following
command?

A. OBJECT TYPE
----------- --------
UTILITIES *SRVPGM
A *SRVPGM
B *SRVPGM
B. OBJECT TYPE
----------- --------
A *MODULE
B *MODULE
UTILITIES *SRVPGM
X *MODULE
Y *MODULE
C. OBJECT TYPE
----------- --------
A *MODULE
B *MODULE
X *MODULE
Y *MODULE
D. OBJECT TYPE
----------- --------
B *MODULE
UTILITIES *SRVPGM
C *MODULE
D *MODULE

Ans. D

Real-Questions.com
000-268 29

Q.69
The following code segment is part of an existing program:
C*ON01Factor1+++++++Opcode (E)+Factor2+++++++Result++++++Len++D+HiLoEq
C If C=D
C Eval *IN50 = *off
C EndIf
Which of the following produces equivalent results under ALL possible conditions?

A. C Eval *IN50 = Not(C =D)


B. C Eval *IN50 = (C =D)
C. C Eval *IN50 = Not *IN50 or (C =D)
D. C Eval *IN50 = *IN50 and Not (C =D)

Ans. D
Q.70
Given the following code segment:
AANO1NO2NO3.Name+++++RLen++TdpBLinPosFunctions++++++++++
++++++
A R DISF SFL
A OPTNBR 1A B 10 3
A SCNDTA 50A 0 10 7
A R DISC
SFLCTL(DISF)
A 79
SFLDSP
A 81
SFLDSPCTL
A
SFLSIZ(1000)
A
SFLPAG(00110
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. DFLDLT
C. SFLRMV
D. SFLINZ

Ans. A

Q.71

Real-Questions.com
000-268 30

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

Ans. C
Q.72
Which of the following can be achieved by passing parameter by Value instead of by
Reference?

A. A packed decimal field being where a data type field is expected


B. A character literal being passed where a date type field is expected.
C. A character field of length 10 being passed where a date type field is
expected
D. A zoned numeric field being passed where a packed decimal field is
expected.

Ans. D

Q.73
Given the following code segment:
CON01Factor+++++++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 segment will perform the equivalent function?
A. /FREE
Select CODE;
WHEN = 1;

Real-Questions.com
000-268 31

ExSr SRONE;
WHEN = 2;
ExSr SRTWO;
Other;
ExSr SRTHREE
EndSI;
/END-FREE
B. /FREE
Select;
WHEN CODE = 1;
ExSr SRONE;
WHEN CODE= 2;
ExSr SRONE;
Other;
ExSr SRTHREE
EndSI;
/END-FREE
C. /FREE
Select CODE;
1;
ExSr SRONE;
2;
ExSr SRTWO;
Other;
ExSr SRTHREE
EndSI;
/END-FREE
D. /FREE
Select WHEN CODE;
1;
ExSr SRONE;
2;
ExSr SRTWO;
Other;
ExSr SRTHREE
EndSI;
/END-FREE
Ans. B
Q.74
Review the following sample subfile:
Picture
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

Real-Questions.com
000-268 32

Ans. B
Q.75
Given the following file definition for a physical file and a logical file:
AANO1NO2NO3.Name+++++++RLen++TDpBLinPosFunctions
A
REF(FLDREF)
A R EMPREC
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. Field accessible:EMPNO,ENAME, DEPT, SALARY


SEQUENCE: EMPNO within DEPT
B. Field accessible:EMPNO,ENAME, DEPT, SALARY
SEQUENCE: DEPT within EMPNO
C. Field accessible:EMPNO, DEPT, SALARY
SEQUENCE: EMPNO within DEPT
D. Field accessible: EMPNO,DEPT, SALARY
SEQUENCE: DEPT within EMPNO

Ans. C

Q.76
The following commands were used to create programs PGMA, PGMB, PGMC and
PGMD.
CRTPGM PGM(PGMA) MODULE(A) ACTGRP(AACCOUNTS)
CRTPGM PGM(PGMA) MODULE(B) ACTGRP(*CALLER)
CRTPGM PGM(PGMA) MODULE(C) ACTGRP(PAYROLL)
CRTPGM PGM(PGMA) MODULE(D) ACTGRP(*NEW)
Assume the following:
Program PGMA calls PGMB, which calls in turn calls PGMD.
All programs return with *INLR = *Off
Upon returning to the commands line from PGMA, the following is entered:
RCLACTGRP ACCOUTS
Following the reclaim, which programs (s) remain in the job?

A. No programs
B. PGMC only
C. PGMC and PGMD only
D. PGMA, PGMB, PGMC and pgmd

Ans. B
Q.77

Real-Questions.com
000-268 33

What keyword is used to return an indication of whether the subfile was folded or
truncated?

A. SFLDROP
B. SFLFOLD
C. SFLMODE
D. SFLDSPCTL

Ans. C

Q.78
Given the following code segment:
/FREE
DoW Not %EoF(Filel);
Read Filel;
EndDo;
/END-FREE
Which of the following changes can be made be ensure that the Read is NOT performed
when File1 is empty?

A. /FREE
SetL1 *LoVal Filel;
DoW Not %EoF(Filel) and %Found(Filel);
Read Filel;
EndDo;
/END-FREE
B. /FREE
DoW Not %EoF(Filel) and %Size(Filel)> *Zero;
Read Filel;
EndDo;
/END-FREE
C. /FREE
SetL1 *LoVal Filel;
DoU %EoF(Filel);
Read Filel;
EndDo;
/END-FREE
D. /FREE
SetL1 *LoVal Filel;
DoW Not %EoF(Filel) or *INLR;
Read Filel;
EndDo;
/END-FREE

Ans. A

Real-Questions.com
000-268 34

Q.79
Given the following code segment:
Dname++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++
D ObjNameDS DS qualified
D Lib 10 Inz(‘*libl)
D Name 10 Inz(‘OBJA)
D PgmNameDS ds
LikeDS(ObJNameDS)Inz(*LIKEDS
D Result s 20
/Free
ObjNameDS.Lib = ‘QGPL’;
PgmNameDS.Name = ‘PGMA’;
Result = PgmNameDS;
/End-Free
After this code runs, what is the value of Result?
A. ‘ OBJA ‘
B. ‘*libl PGMA ‘
C. ‘QGPL OBJA ‘
D. ‘QGPL PGMA ,
Ans. B
Q.80
Given the following code segment:
…. Dname++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++
001 D MyPROC 3
002 D P1 D
003 D P2 5A
004 D P3 D
What is the purpose of the value “3” specified on line1?

A. To declare that 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

Ans. D

Q.81
Given the following code excerpt:
OName+++++++DF..NO1NO2NO3Excnam++++B++A++Sb+Sa......
OPRINT D
0………………NO1NO2NO3Field++++++++++YB….++PConstant/Editword/DTfpr
0 INVOICE 10
0 AMOUNT 18
0 CUSTNUM 25
What do the numbers to the right of the field names specify?

Real-Questions.com
000-268 35

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

Ans. B
Q.82
Given the following code segment:
0001.00 D DataField S D
DATFMT(*ISO)
0002.00 D CharField S 6A
INZ(‘040696’)
0003.00 C *MDY MOVE CharField DateField
This cod 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 *MDYO 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

Ans. B

Q.83
File CustSales contains a record format CustSalesR, Which includes twelve sales buckets
buckets named SaBuck01 through SaBuck12. Given the following code segment:
fCustSales if e k disk
d SalesHist e ds exname(CustSales)
d SalesArray s dim(12) like(SaBuck01)
based(Sptr)
d sptr s * inz(%add(SaBuck))
What is the purpose of data structure SalesHist?

A. To allow the field names to be qualified with name


B. To prevent level checks in the event of changes to recover format
CustSalesR
C. To ensure that sales buckets are in packed decimal format
D. To ensure that sales buckets are contiguous in memory

Ans. D
Q.84

Real-Questions.com
000-268 36

What reserved word can be used to move the job’s date, including century, into an eight-
position numeric field?

A. *DATE
B. UDATE
C. *ISO
D. JOBDATE

Ans. A
Q.85
In an RPG program, which of the following is used as an alternative to an *ENTRY
PLIST?

A. A procedure interface defined with the IMPORT keyword


B. A data structure defined with the IMPORT keyword
C. A prototype with the EXTPGM keyword
D. A procedure interface and a prototype

Ans. D

Q.86
Which of the following code segments will FLD1 with lower-case x characters?

A.
CLONO1Factor1+++++++Opcode&ExtFactor2+++++++Result+++++++Le
n++D+HiLoEq
C ‘X’ Subst
Fldl:*All
B.
CLONO1Factor1+++++++Opcode&ExtFactor2+++++++Result+++++++Len++D+HiLo
Eq
C *All Move
‘x’ Fldl
C.
CLONO1Factor1+++++++Opcode&ExtFactor2+++++++Result+++++++Len++D+HiLo
Eq
C Move *All‘x’ Fldl
D.
CLONO1Factor1+++++++Opcode&ExtFactor2+++++++Result+++++++Len++D+HiLo
Eq
C *Fill Move
‘x’ Fldl

Ans. C
Q.87
Service program UTILA is a utility service program that once called MUST remain
active for the life of job. Which pf the following commands will create the service
program so that once it has been initiated all further calls to its procedures will use the
same instance?

Real-Questions.com
000-268 37

A. CRTSRVPGM SRVPGM(UTILA) ACTGRP(*NEW)


B. CRTSRVPGM SRVPGM(UTILA) ACTGRP(*CALLER)
C. CRTSRVPGM SRVPGM(UTILA) ACTGRP(UTILITYA)
D. CRTSRVPGM SRVPGM(UTILA) ACTGRP(*DFT)
Ans. C
Q.88
What is the purpose of a procedure prototype in a calling program?
A. To identify the names of work fields to be used in the subprocedure
B. To define the local variables of the procedure
C. To ensure the procedure is called with appropriate parameter
D. To define the field names to be passed on the call to the subprocedure
Ans. C
Q.89
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’2003-06-
27’)DatFmt(*ISO)

A. DateFld = %Date(mmddyy: *MDY);


B. DateFld = %Date(mmddyy: *MDY0);
C. DateFld = %Date(mmddyy: *ISO);
D. DateFld = %Date(mmddyy: *ISO0);

Ans. B
Q.90
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 = Datel -
%Diff(Date3:Date2:*Y)

A. Date4 = ‘12/31/2031’
B. Date4 = ‘31/12/31’
C. Date4 = ‘12/31/9991’
D. Date4 = ‘91/12/31’
Ans. A

Real-Questions.com
000-268 38

Q.91
Given the following code segment:
Dname++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++
D Area s 3s 0 DIM(10)
D Index s 2s 0 Inz(0)

/FREE
For Index = 1to %Elem(Area);
Arra(Index) = 2 *Index;
EndFor;
/END-FREE
What is the value of field index after the code is run?

A. 0
B. 22
C. 10
D. 11

Ans. D

Q.92
In the following segment, if file CUSMS contains a field CMCDNM, how would that be
reference to as a subfield of the 3rd element of data structure array CUSTINFO?
FFilename++IPEASF…..L…..A.Device+.Keywords+++++++++++++++++++
Fcusms if e k disk
rename(cusmsr:custmastr)
Dname++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++
d custinfo ds qualified
dim(4)
d salesman 3 0
d custrecd likerec (custmastr)

A. custinfo(3).cmcsnm
B. custinfo custrecd(3).cmcsnm
C. custinfo.cmcsnm(3)
D. custinfo(3).custrecd.cmcsnm

Ans. D

Real-Questions.com

Potrebbero piacerti anche