Chapter Contents

Previous

Next
An Overview of the SAS/C Debugger

Introduction

This chapter introduces the methods of running the SAS/C Debugger, summarizes its capabilities, and provides a quick start to using the debugger under the CMS and OS/390 operating environments.


Methods of Running the Debugger

The SAS/C Debugger helps you find run-time errors, or bugs, in programs that have been compiled by the SAS/C Compiler. This process is commonly referred to as debugging. The debugger has been designed to help you determine the location of errors in your programs and the reasons why the errors are occurring.

There are two interactive methods of running the SAS/C Debugger under both CMS and OS/390: full-screen mode and line mode. If you are running under OS/390, you can also run the debugger noninteractively in batch mode.

Full-Screen Mode

In full-screen mode, the SAS/C Debugger must be used with an IBM 3270 type of terminal display system or an emulator. Today, most people work on a Windows operating environment that uses 3270 emulator software. If your terminal supports full-screen applications, the SAS/C Debugger runs in full-screen mode by default. In full-screen mode, the debugger provides an interactive windowing interface that enables you to view information and operate through a series of windows. Each window has a distinct function and displays logically related data. You will probably find that full-screen mode offers the most efficient interface.

Line Mode

You can override the default and run the debugger interactively in line mode. In line mode, you issue debugger commands at the Cdebug: prompt, and the screen displays information in response. The SAS/C Debugger supports all commands from previous releases as well as several new features for Release 7.00. You can switch to line mode after invoking the debugger, as described in Switching to Line Mode.

Batch Mode

The OS/390 data set can be routed to any system output device that is available at your site, including a direct access storage device or your terminal. The details of batch mode are presented in Running the Debugger under TSO and in Running the Debugger under OS/390 Batch.


Capabilities of the SAS/C Debugger

Regardless of the method you use to run the debugger, you will find that it has many capabilities that will enhance your productivity. With the SAS/C Debugger, you can


Understanding Full-Screen Mode

The SAS/C Debugger must be used with an IBM 3270 type of terminal display system or emulator. An IBM mainframe environment handles screen display differently from a UNIX or Windows environment. If you are new to IBM mainframes, be aware of some of the differences, because they affect the way you interact with the SAS/C Debugger. A basic understanding of 3270 concepts helps you to understand why the debugger reacts in a manner that may seem unfamiliar to you. These differences are explained in the following section.

Basic 3270 Concepts

Typically, under the UNIX or Windows environments, input characters are available to an application program immediately as they are typed. In fact, the terminal may be equipped with keys that allow characters to be deleted from or inserted into a string of characters that is input to an application program. The application program processes all characters as they are input until a complete field is assembled.

Instead of single-character, unbuffered input and output as is used under the Windows or UNIX environments, the IBM 3270 terminal environment maps each character on the display to a storage area in the device. This storage area is known as the character buffer. The applications program, in this case the SAS/C Debugger, uses commands to send or receive data from this buffer. The data that is transferred between a terminal and an application is referred to as the data stream. An IBM 3270 data stream includes commands and control characters that specify the processing of the data in the character buffer. Most often, the buffered data are grouped into fields and formatted by using display attribute codes.

An application program can then display information by constructing a data stream and sending it to the device. Input is obtained by reading the buffered data and decoding the data stream that is returned. As a result, in IBM data stream programming, output to the terminal is the result of a command; input to an application program occurs only when the ENTER key or a program function key is pressed.

Once a data stream is constructed, an application program in an IBM mainframe environment must ask the operating environment to transmit it to the terminal.

Note:    The ability to display attributes such as color or reverse video may be limited by the capabilities of your terminal.  [cautionend]

Differences in Handling Characters summarizes some important differences between the IBM 3270 full-screen communication and other environments. Be aware of these differences when you use the SAS/C Debugger. For additional information about the IBM 3270 data stream and full-screen programming, see the SAS/C Full-Screen Support Library User's Guide.

Differences in Handling Characters
IBM 3270 Other Environments
buffered input single character, unbuffered input
character available after ENTER or function key character available every keystroke
character cannot be deleted after ENTER or function key character can be deleted from assembled character string


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.