410 likes | 554 Views
IT IS Session#: 5138. GRDS II:. Debugging Demystified. 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
E N D
IT IS Session#: 5138 GRDS II: Debugging Demystified
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
Review of GRDS: I • Generated Runtime Diagnostic Service • It is Subsystem of UT • It is not a step through debugger
Review of GRDS: I – Turn on Logging 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 • 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.
Review of GRDS: I – Custom Diagnostics In any hook use the SHOWA command
Review of GRDS: I – Custom Diagnostics When making the Service Request, ask for Lvl 1 manual diagnostics
Review of GRDS: I – Custom Diagnostics Your custom diagnostic code in the logfile
Review of GRDS: I – More with SHOWA • 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 • 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 • 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 Delivered processes that include SHOWA
Review of GRDS: I – More with SHOWA Delivered processes that include SHOWA
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
Show Changed SHOWC: Logs if the value has changed
Show Changed Note: The above lines of code could be on one line. Separate variables with a semi-colon (“;”) or a comma(“,”) • SHOWC: On Fld Exit Phantom for Custom Entity On 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
Show Changed • SHOWC • The first time SHOWC is encountered • Before the process ends
Show Changed • 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 Processes that have embedded SHOWC
Envision Basic CONFIRM command • Syntax CONFIRM [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
Envision Basic CONFIRM command • Syntax CONFIRM [level] expr [NOT] tests [;* message] • [;* message] • Optional message to further clarify the error • Text following the asterisk will be added to the error messaging
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
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
Envision Basic CONFIRM command • 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 Message is displayed to the form
Envision Basic CONFIRM command Message is also logged by GRDS
Envision Basic CONFIRM command • 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
Tips/Hints/Service Requests • $DEMANDED SHOWA $DEMANDED • logs the value of ALLV., VL., KV., KEY., and filename.ADD.MODE variables • Will also log Batch Process Variables (BPV.) if they are flagged as non permanent • $TABLE SHOWA $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 • Keep blanks on their own line • SHOWA “ “ • 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
Tips/Hints/Service Requests • 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 • 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 • 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 documentation GRDS services provided by this process: 1: For basic diagnostics W: For diagnostics associated only with workflow
The End Enjoy the rest of your conference Rich Murray rjm@datatel.com