IBC233 Review

  1. How would you get to a menu called SAVE?
  2. Which function key will show you all the keywords for a command in the command entry screen in client access? How do you see keywords in RDi?
  3. What is the CL command to execute a program?
    A menu?
  4. What are the parts or the library list and how does each part change?
  5. Is a library list an object?
  6. What is the difference between the CRTPF command and the CHGPF command?
  7. What are the system values that store:
    The system model
    The system part of the library list
    The user part of the library list
  1. What is the keyword notation syntax to Work With all of the Program objects in IBC233LIB using PDM.

Work with Objects Using PDM (WRKOBJPDM)

Library ...... LIB *PRV

Object ...... OBJ *ALL

Object type ...... OBJTYPE *ALL

Object attribute ...... OBJATR *ALL

  1. What is so special about libraries, device descriptions and user profiles?
  1. Write the Keyword Notation to Monitor for the Message CPF0864. If the message is found, the command, GoTo CmdLabel End should be executed.

Programming question

Your program uses the display file LIBDSPF with the following attributes:

Update Library List MM/DD/YY
hh:mm:ss
  1. for IBC233 UUUUUUUUU
  2. for BAC344
Option: BB Invalid Option
Library list already updated for Option: OO
F3=Exit

RECORD1

Field/Constant / Definition / Indicator used / Purpose of Indicator or Keyword
MM/DD/YY / system constant
hh:mm:ss / system constant
  1. for IBC233

UUUUUUUUUU / system constant
  1. for BAC3444

Option
&option / 2A / &in99 / Reverse Image and Position Cursor
Invalid Option / &in99 / Field conditioning
Library List already updated for Option: / &in98 / Field Conditioning
&optout / 2A / &in98 / Field Conditioning
F3=Exit / &in03 / CA03

Write the CL program that uses the above display file LIBDSPF with the record format RECORD1.

If option 1 is selected, then BAC344LIB should be removed from the library list and IBC233LIB inserted in it’s place.

If option 2 is selected, then IBC233LIB should be removed from the library list and BAC344lib inserted in it’s place.

The invalid option message should be displayed if any options other than 1 or 2 are selected.

The library list already updated message should be displayed if the library is already on the list.

The program should loop until F3 is pressed.

Important notes:

ADDLIBLE gives the error message, CPF2103 if the library already exists on the library list

RMVLIBLE gives the error message, CPF2104 if the library is not on the library list.

Be sure to comment your code

On your own Work

Write the command to check IF the contents of the variable &IN43 is equal to character ‘1’. IF this condition is true, then change the contents of the variable &IN43 to have a character ‘0’ in it.

Write the Keyword notation to retrieve your Initial program to call from your user profile.

Write the keyword notation to retrieve the initial program to call from the userid DB233C40.

Write the command to change your user profile’s password to ‘CINDY’.

Write the command to change the password to CINDY for the userid DB233C40. Can you do this on ZEUS? If not – why?

Your RPG program uses a display file called MULTDF with the following attributes:

Multiply 2 numbers MM/DD/YY
hh:mm:ss
Number1: 999 UUUUUUUUU
Number2:999
Result: 66,666.66
F3=Exit
Field/Constant / Definition / Indicator used / Purpose of Indicator
MM/DD/YY / system constant
hh:mm:ss / system constant
UUUUUUUUUU / system constant
Number1
num1 / 3S 0
Number2
num2 / 3S 0
Result
Result / 7S 2
F3=Exit / CA03 / *in03

Write the RPG program that uses the above display file MULTDF with the record format RECORD1.

To calculate results as follows:

Result = num1 * num2

Your program should calculate the result every time the enter key is pressed.

The program should loop until F3 is pressed.

Be sure to comment your code.

Enter the code for the file description:

File File End of File

Filename Type Designation File Addition

______

Sequence File Limits Record

Format Processing Address Type Device

_ _ _ _

Keywords Comment

______

CL commands and Syntax:

Command / Parameter keyword(s)
ADDLIBLE / LIB POSITION
CALL / PGM PARM
CALLPRC / PRC PARM RTNVAL
CHGCURLIB / CURLIB
CHGLIBL / LIBL CURLIB
CHGVAR / VAR VALUE
CHKOBJ / OBJ OBJTYPE MBR AUT
DCL / VAR TYPE LEN VALUE
DCLF / FILE RCDFMT OPNID
DO
DSPDBR / FILE OUTPUT
DSPFD / FILE TYPE OUTPUT FILEATR
DSPFFD / FILE OUTPUT
DOFOR / VAR FROM TO BY
DOUNTIL / COND
DOWHILE / COND
DSPMSG
DSPSPLF / SPLNBR(*LAST)
DSPSYSVAL / QSTSMSG
QSVRAUTITV
QSYSLIBL
QTHDRSCADJ
QTHDRSCAFN
QTIME
EDTLIBL
ELSE / CMD
ENDDO
ENDPGM
ENDSELECT
GOTO / CMDLBL
GRTOBJAUT / OBJ OBJTYPE ASPDEV
USER AUT AUTL REFOBJ REFOBJTYPE REFASPDEV
REPLACE
IF / COND THEN
MONMSG / MSGID(CPF0864) CMPDTA EXEC
PGM / PARM
OTHERWISE / CMD
OVRDBF / LVLCHK
OVRPRTF / SPLFNAME
RCVF / DEV RCDFMT OPNID WAIT
RMVLIBLE / LIB
RTVOBJD / SYSLVL
RTVSYSVAL / SYSVAL RTNVAR
RTVUSRPRF / RTNUSRPRF TEXT MAXSTG STGUSED PWDEXPITV NOTVLDSIGN OUTQ
RUNQRY / QRY QRYFILE OUTTYPE
OUTFORM RCDSLT
RVKOBJAUT / OBJ OBJTYPE ASPDEV
USER AUT AUTL
SELECT
SNDMSG / MSG TOUSR
SNDUSRMSG / MSGRPY
SELECT
SNDMSG / MSG TOUSR
SNDPGMMSG / MSG
SNDRCVF / DEV RCDFMT OPNID WAIT
SNDUSRMSG / MSG MSGID MSGF MSGDTA VALUES DFT MSGTYPE
TOMSGQ TOUSR MSGRPY
TRNTBL CCSID
WHEN / COND THEN
WRKOUTQ / OUTQ
WRKSPLF
String Handling
%SST(&FIELDA offset length)
&STRINGA *CAT &STRINGB
&STRINGA *BCAT &STRINGB
&STRINGA *TCAT &STRINGB
Indicators
/ &IN03

RPG Verbs, Functions and Special Values

RPG / Attribute
%EOF / File Name
%TRIM / Field Name
DOU / Condition
DOW / Condition
ENDDO
ENDIF
ENDSL
EXCEPT| / Record name
EXFMT / Record name
OTHER
READ / File Name
RETURN
SELECT
WRITE / Record Name
WHEN / Condition
*ENTRY
PLIST
PARM
*IN03
EXSR
BEGSR
ENDSR
*INLR = *ON