IBM Software
SearchHomeProgramProcessCertificationsNewsNavigatorFeedback
Professional Certification Program from IBM
Home
Test 015:Edu. & Pubs.Objective

REXX for OS/2
Sample Test 015


SECTION 1 - REXX BASICS

1. Which are valid REXX variables?

a. 4some
b. some4
c. !some4
d. .some.4

2. Which character is used to separate multiple REXX clauses on the same line?

a. ;
b. ,
c. :
d. \

3. What is the result of the expression 3**2**2?

a. 12
b. 36
c. 64
d. 81

SECTION 2 - PROGRAM CONTROL

4. What is the final value of CTR after executing DO CTR = 1 to 25 by 5?

a. 21
b. 25
c. 26
d. unknown

SECTION 3 - USING OS/2 COMMANDS

1) /* */ 
2) 
3) type filename 
4) "type" filename 
5) type filename "| more" 
6) type filename | more 

5. Given the above code sample and given that filename is a variable, which lines would execute successfully?

a. Line 3
b. Line 4
c. Line 5
d. Line 6

6. Which conditions are associated with OS/2 commands?

a. HALT
b. ERROR
c. FAILURE
d. NOTREADY

SECTION 4 - DEBUGGING TOOLS

7. What are two ways to activate tracing without putting a trace instruction in a program?

a. PMREXX
b. PMTRACE
c. RXTRACE
d. REXXTRY

8. When interactive trace pauses, which options are valid?

a. pressing the + key
b. pressing the enter key
c. turning interactive trace off
d. changing the source code

SECTION 5 - FUNCTIONS AND SUBROUTINES

9. What is the effect of the RETURN instruction in a main routine?

a. It ends the program.
b. It produces a syntax error.
c. It returns to the beginning of the program.
d. It displays a return value at the command prompt.

10. Which statements describe the ARG instruction?

a. It leaves lowercase alphabetic characters in lowercase.
b. It converts lowercase alphabetic characters to uppercase.
c. It can be used to receive arguments from the queue.
d. It can be used to receive arguments from the command prompt.

1)  /*  NAMES.CMD   */
2)  arg first second third
3)  say "first is "first
4)  say "second is "second
5)  say "third is "third
11. Given the above code sample and given that the program name is NAMES.CMD, if the user runs it by typing -- names Groucho Chico Harpo Zeppo -- at the command prompt, what would line 5 display?

a. third is Harpo
b. third is HARPO
c. third is Harpo Zeppo
d. third is HARPO ZEPPO

SECTION 6 - QUEUES

12. Which statements describe private queues?

a. they can be deleted with RXQUEUE()
b. they are deleted when the session is closed
c. there can only be one private queue per OS/2 session
d. there can be multiple private queues per OS/2 session

1)  /*  */
2)
3)  push "North"
4)  queue "South"
5)  push "East"
6)  queue "West"
13. Given that the queue is empty when the above program begins, which item would be at the top of the queue after the program has run?

a. North
b. South
c. East
d. West

SECTION 7 - PARSING

1)  /*   */
2)
3)  pull name
4)  say name
5)  parse pull name
6)  say name
14. Given the above code sample and given that the session queue is empty when the program begins, if at line 3 the user types in -- Franklin D. Roosevelt -- what would line 4 display?

a. Franklin
b FRANKLIN
c. Franklin D. Roosevelt
d. FRANKLIN D. ROOSEVELT

1)  /*   */
2)
3)  pull first last
4)  say "*"last"*"
5)  parse pull first last
6)  say "*"last"*"
15. Given the above code sample and given that the session queue is empty when the program begins, if at line 5 the user types in -- Hans Christian Andersen -- what would line 6 display?

a. *Christian*
b *CHRISTIAN*
c. *Christian Andersen*
d. *CHRISTIAN ANDERSEN*

1)  /*   */
2)
3)  address = "Florence Italy"
4)  parse var address city "," country
5)  say "*"city"*"
6)  say "*"country"*"
16. Given the above code sample, what would line 6 display?

a. **
b * *
c. * Florence Italy*
d. * FLORENCE ITALY*

SECTION 8 - HANDLING ERRORS

17. When does the FAILURE condition occur?

a. when a syntax error occurs
b. when Ctrl + Break is pressed
c. when an input/output error occurs
d. when an uninitialized variable is used
e. when a command issues a non-zero return code
f. when a severe error prevents processing of a command

18. What happens when the ERROR condition occurs and no trap has been set?

a. The condition is ignored.
b. Interactive trace is activated.
c. The program issues a warning message.
d. The program ends and a message is displayed.

SECTION 9 - INPUT/OUTPUT

19. Which statements describe the LINEIN() function?

a. Its initial position is top of file.
b. Its initial position is end of file.
c. It reads from the queue as a default.
d. It reads from the keyboard as a default.

20. Which statements describe the LINEOUT() function?

a. Its initial position is top of file.
b. Its initial position is end of file.
c. It can be called as a subroutine.
d. It can be executed as a command.

SECTION 10 - REXX AND APPLICATIONS

21. Which REXXUTIL function is used to modify Workplace Shell objects?

a. SysModifyObject
b. SysSetObjectData
c. WinModifyObject
d. WinSetObjectData

22. Which REXXUTIL function is used to modify OS2.INI?

a. SysIni
b. SysModifyIni
c. WinIni
d. WinModifyIni

REXX for OS/2
Sample Test 015

ANSWER KEY

1. bc

2. a

3. d

4. c

5. abc

6. bc

7. ac

8. bc

9. a

10. bd

11. d

12. ad

13. c

14. d

15. c

16. a

17. f

18. a

19. ad

20. bc

21. b

22. a



CERTIFICATION NAVIGATOR:
Select Certification, or Test Number and Topic, or a Site Page
Site Map   Help

AND

IBM Home PageSupportContact IBMEmploymentPrivacyLegal
©1998 IBM Corporation