1 / 17

EP105 Debugging Sybase XJS/390: How Can We Help?

EP105 Debugging Sybase XJS/390: How Can We Help?. Bruce Yelen Senior Software Engineer Enterprise Solutions Division Byelen@sybase.com. The most common error message you’ll see! Not very informative. Have to “count” and find the line. Hopefully it’s an obvious error!.

elom
Download Presentation

EP105 Debugging Sybase XJS/390: How Can We Help?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EP105Debugging Sybase XJS/390:How Can We Help? • Bruce Yelen • Senior Software Engineer • Enterprise Solutions Division • Byelen@sybase.com

  2. The most common error message you’ll see! Not very informative. Have to “count” and find the line. Hopefully it’s an obvious error! The “dreaded” message -

  3. Nothing! But line 24 is missing its semicolon. Line 25 shows -

  4. The script returns its proper output. With the fix in place -

  5. The script runs, but the data is wrong. (We’re not all into skating) When the problem is not as simple –

  6. The XJS/390 debugger follows the program flow, and shows variables Debugging the script –

  7. When using the debugger, keep the following in mind: It can only debug functions. It will only step from the first instruction (breakpoints will be supported in future releases). The field values of a MSCRMAP object will not show in the Automatic Variable or Watch windows. It is useful for checking the logic “flow”. XJS/390 debugger –

  8. Add statements to printout trace data. These can be: Write() or writeln() statements. Use the sendmsg() method of mscrtds. Write to CICS temporary storage. Problems with write/writeln/sendmsg: These commands conflict with the sendrow() method of mscrtds. They may not send any data or text. CICS temporary storage is more reliable. Getting more debugging data –

  9. For those unfamiliar with CICS: “Temp storage” is an area that CICS applications can store data for retrieval later. The application provides a queue name. Any data stored under that queue name can be retrieved “first in, first out”. XJS/390 provides easy access to CICS temp storage. CICS Temporary Storage

  10. We’ve added the commands to write the phone number from DB2 and the key being used to read the VSAM dataset to a temp storage queue named “DEBUG ”. Using temp storage for tracing –

  11. Do it the hard way by logging into CICS… Viewing the saved temp storage data –

  12. Or the easy way with Mscript! Viewing the saved temp storage data –

  13. HostLib(cics, "MSCRCICS", map, "MSCRMAP", tds, "MSCRTDS"); var queuedata = map.static(80); var qdata = map.field(queuedata,0,map.char,80); tds.describe(1, queuedata,qdata,60,"Temp Storage"); var i = 1; while (cics.readq("DEBUG ",queuedata,i) == 0) { tds.sendrow(); i++; } tds.senddone(); cics.deleteq("DEBUG "); Simple Mscript code to read (and delete) CICS temp storage –

  14. We never moved the phone number into the VSAM record key! The error is revealed –

  15. The missing line’s been added…. Make the correction –

  16. Run the test – The output looks good….. And the trace output is correct!

  17. Future releases of XJS/390 will include various debugging enhancements, including: Breakpoints. Display attribute and data of MSCRMAP object fields. Support for array variable display. Future Debugging Enhancements

More Related