41
GRDS II: Debugging Demystified IT IS Session#: 5138

GRDS II: Debugging Demystified IT IS Session#: 5138

Embed Size (px)

Citation preview

Page 1: GRDS II: Debugging Demystified IT IS Session#: 5138

GRDS II:Debugging Demystified

IT IS Session#: 5138

Page 2: GRDS II: Debugging Demystified IT IS Session#: 5138

Agenda

• Review GRDS: I (the cool tool to make you drool)– Turn Logging On: Service Requests– Turn Logging Off: Reviewing the Logfile– Custom Diagnostics: SHOWA, SHOWA @#,

SHOWA @a

• Show Changed: SHOWC, SHOWC @#, SHOWC @a

• Envision Basic CONFIRM command• Tips/Hints/Service Requests

Page 3: GRDS II: Debugging Demystified IT IS Session#: 5138

Review of GRDS: I

• Generated Runtime Diagnostic Service

• It is Subsystem of UT– It is not a step through debugger

Page 4: GRDS II: Debugging Demystified IT IS Session#: 5138

Review of GRDS: I – Turn on Logging

Page 5: GRDS II: Debugging Demystified IT IS Session#: 5138

Review of GRDS: I – Turn on Logging

Page 6: GRDS II: Debugging Demystified IT IS Session#: 5138

Review of GRDS: I – Turn on Logging

Page 7: GRDS II: Debugging Demystified IT IS Session#: 5138

Review of GRDS: I – Turn on Logging

Page 8: GRDS II: Debugging Demystified IT IS Session#: 5138

Once you understand the syntax (scope / service_code, service_code,...) and know which service codes you want, it’s easy to write it on GRSS rather than detailing to GRSD

Review of GRDS: I – Turn on Logging

Page 9: GRDS II: Debugging Demystified IT IS Session#: 5138

Review of GRDS: I – Turn on Logging

• That’s all it takes to turn the logging on

• Next step is to run your process.– After the process runs, turn logging off

and review the diagnostic log file.

Page 10: GRDS II: Debugging Demystified IT IS Session#: 5138

Review of GRDS: I – Turn off Logging

Page 11: GRDS II: Debugging Demystified IT IS Session#: 5138

Review of GRDS: I – Review the Logfile

Page 12: GRDS II: Debugging Demystified IT IS Session#: 5138

• In any hook use the SHOWA command

Review of GRDS: I – Custom Diagnostics

Page 13: GRDS II: Debugging Demystified IT IS Session#: 5138

• When making the Service Request, ask for Lvl 1 manual diagnostics

Review of GRDS: I – Custom Diagnostics

Page 14: GRDS II: Debugging Demystified IT IS Session#: 5138

• Your custom diagnostic code in the logfile

Review of GRDS: I – Custom Diagnostics

Page 15: GRDS II: Debugging Demystified IT IS Session#: 5138

• S.REG.STU.COURSE.SECTIONS

This will be in the log ONLY if Level 2 or higher manual diagnostics are requested

Review of GRDS: I – More with SHOWA

Page 16: GRDS II: Debugging Demystified IT IS Session#: 5138

• S.REG.STU.COURSE.SECTIONS

This will be in the log ONLY if Level 4 or higher manual diagnostics are requested

Review of GRDS: I – More with SHOWA

Page 17: GRDS II: Debugging Demystified IT IS Session#: 5138

• The numeric codes are cumulative– A level 5 manual diagnostic service code, will

log all lines with:

SHOWA @5, SHOWA @4, SHOWA @3,

SHOWA @2, SHOWA @1

• The alphabetic codes are independent– A diagnostic service code of M, will log ONLY

those lines that have:

SHOWA @M

Review of GRDS: I – More with SHOWA

Page 18: GRDS II: Debugging Demystified IT IS Session#: 5138

• Delivered processes that include SHOWA

Review of GRDS: I – More with SHOWA

Page 19: GRDS II: Debugging Demystified IT IS Session#: 5138

• Delivered processes that include SHOWA

Review of GRDS: I – More with SHOWA

Page 20: GRDS II: Debugging Demystified IT IS Session#: 5138

Show Changed

• SHOWC– Same syntax conventions as SHOWA

• SHOWC• SHOWC @#• SHOWC @a

– Same service request• Lvl1 manual diagnostics: SHOWC or SHOWC

@1• Lvl# manual diagnostics: SHOWC @#• Manual diagnostics type a: SHOWC @a

Page 21: GRDS II: Debugging Demystified IT IS Session#: 5138

Show Changed

• SHOWC: Logs if the value has changed

Page 22: GRDS II: Debugging Demystified IT IS Session#: 5138

Show Changed

• SHOWC: On Fld Exit Phantom for Custom EntityOn Events/Hooks PostConf

SHOWC V.DATE.CONFIRMED;V.GUEST.PHONE.NUMBER

SHOWC V.AMOUNT.PAID,V.ARRIVAL.DATE

SHOWC V.HOST.NAME;V.HOST.PHONE

Note: The above lines of code could be on one line. Separate variables with a semi-colon (“;”) or a comma(“,”)

Page 23: GRDS II: Debugging Demystified IT IS Session#: 5138

Show Changed

• SHOWC– The first time SHOWC is encountered

– Before the process ends

Page 24: GRDS II: Debugging Demystified IT IS Session#: 5138

• Options regarding SHOWC– SHOWC -@ V.DATE.CONFIRMED

• If the variable has not changed, the -@ option will log: V.DATE.CONFIRMED (no change)

• The -@ option is only available with SHOWC

– SHOWC –A VL.PERSON.EMAIL.ADDRESSES• Will log the ASCII character code for non

printable characters such as the value mark (@VM)

– You can combine options• SHOWC -@,A VL.PERSON.EMAIL.ADDRESSES

– You can track up to 2,000 variables

Show Changed

Page 25: GRDS II: Debugging Demystified IT IS Session#: 5138

• Processes that have embedded SHOWC

Show Changed

Page 26: GRDS II: Debugging Demystified IT IS Session#: 5138

Envision Basic CONFIRM command

• SyntaxCONFIRM [level] expr [NOT] tests [;* message]

– [level]• 0 (default if no level is specified), 1 or 2• Works with service request of C1 (log low cost CONFIRM statements) and C2 (log all CONFIRM statements)

• Sets a system boolean variable CONFIRMED to true if the test succeeds

– expr• The expression to be tested. Typically a programmer defined variable, argument or field buffer value.

– tests• One or more tests to perform on the expression. Failing any of the tests will display and log an error message

Page 27: GRDS II: Debugging Demystified IT IS Session#: 5138

Envision Basic CONFIRM command

• SyntaxCONFIRM [level] expr [NOT] tests [;* message]

– [;* message]• Optional message to further clarify the error• Text following the asterisk will be added to the error messaging

Page 28: GRDS II: Debugging Demystified IT IS Session#: 5138

Envision Basic CONFIRM command

• Example– Log an error message if the return

argument(s) from a subroutine are null• For demonstration purposes:

– Use S.GET.USER.PERSON.ID subroutine» Returns the Org Entity ID value from SOD

– Display this value on a form– I removed my Org Entity ID from my SOD record

Page 29: GRDS II: Debugging Demystified IT IS Session#: 5138

Envision Basic CONFIRM command

Page 30: GRDS II: Debugging Demystified IT IS Session#: 5138

Envision Basic CONFIRM command

“PRESENT” is a function used with CONFIRM and tests for a non null value

For a complete list of available functions, refer to the Envision Basic Commands Reference, p. 84-85

Page 31: GRDS II: Debugging Demystified IT IS Session#: 5138

• Modify Service Request on GRSS– Was XDMS21 / 1

• Level one manual diagnostic to log SHOWA and SHOWC commands

– Now XDMS21 / 1, C1• Log SHOWA, SHOWC and CONFIRM level 0 or

1

• Execute XDMS21

Envision Basic CONFIRM command

Page 32: GRDS II: Debugging Demystified IT IS Session#: 5138

• Message is displayed to the form

Envision Basic CONFIRM command

Page 33: GRDS II: Debugging Demystified IT IS Session#: 5138

• Message is also logged by GRDS

Envision Basic CONFIRM command

Page 34: GRDS II: Debugging Demystified IT IS Session#: 5138

• Some Subroutines that have CONFIRM statements– S.CALC.ATTENDANCE.GRADE

– S.CALC.PARTICIPATION.GRADE

– S.CHECK.PERM.TO.REGISTER

– S.CREATE.AR.RCPT

– S.CREATE.CASH.RCPT

Envision Basic CONFIRM command

Page 35: GRDS II: Debugging Demystified IT IS Session#: 5138

• $DEMANDEDSHOWA $DEMANDED − logs the value of ALL V., VL., KV., KEY., and filename.ADD.MODE variables

− Will also log Batch Process Variables (BPV.) if they are flagged as non permanent

• $TABLESHOWA $TABLE(VL.BPV.1, VL.BPV.2, VL.BPV.3)− will show those 3 fields in an easier to read

table format, using 3 columns and as many rows as there are values in the association

Tips/Hints/Service Requests

Page 36: GRDS II: Debugging Demystified IT IS Session#: 5138

Tips/Hints/Service Requests

• Keep blanks on their own lineSHOWA “ “

SHOWA V.ID;V.LAST.NAME;V.FIRST.NAME

• Replace CRT with CALL S_GRAS– CALL S_GRAS(“whateverwasintheCRT”)– If GRDS is on, then the line will go to the log

and to the console– If GRDS is off, then the line will go to the

console only

Page 37: GRDS II: Debugging Demystified IT IS Session#: 5138

• Some cool service requests– S_MIO_EXECUTE / A

• Log statements that get executed by S_MIO_EXECUTE (S.EXECUTE)

– S.PROC.RUN / A • Log statements that get executed by

Procedure Statements

– JBSU01 / A • Log statements that get executed by old

school Procedures (PGDF)

Tips/Hints/Service Requests

Page 38: GRDS II: Debugging Demystified IT IS Session#: 5138

• More cool service requests– S_SQL_SEL / A– S_MIO_SEL / A

• Logs what select statements are getting executed

• What is actually running?– When diagnosing a problem you may not know

which process is causing the issue– * / PE,PX

• Gives you a report of all the processes running

Tips/Hints/Service Requests

Page 39: GRDS II: Debugging Demystified IT IS Session#: 5138

• Don’t request everything * / * (yikes)

• And not A=CORE / AE,AX (yowsa)– So the idea is to limit the scope somewhat

• Document what you did– Put it on process technical

documentationGRDS services provided by this process:

1: For basic diagnostics

W: For diagnostics associated only with workflow

Tips/Hints/Service Requests

Page 40: GRDS II: Debugging Demystified IT IS Session#: 5138

Questions?

Page 41: GRDS II: Debugging Demystified IT IS Session#: 5138

The End

Enjoy the rest of your conference

Rich [email protected]