Using print.C routines


One of the most helpful components of the driver program is the set of print routines located in the print.C file. These routines enable you to print the contents of any data structure in the API. The routines provide code examples for accessing various structure members. Printing the contents of a structure before and after an API call is a useful debugging tool.

Warning

Important

See the function definitions in print.C to determine the specific parameters and their types for these routines.

The following examples illustrate the use of the print.C routines:

The code fragment calls three print.C functions:

main()
{
...
PrintARFieldValueList(&fieldList);
PrintReal("header", &value);
PrintAREntryIdList("header", "header2", &value);
...
}

Here is a code fragment that shows the output after AR System executes the command print_entry fred EX000003. The server name is fred and the entry ID is EX000003.

numItems = 9
ID=FIELD VALUE
----------------------------
1=(char) EX000003
2=(char) snoopy
3=(timestamp) 11/22/94
4=(char) snoopy
5=(char) Demo
6=(timestamp) 11/23/94
7=(selection) 2
8=(char) TESTING
15(S.H.) 5 stat hist items
0 - 1/18/95Demo
1 - 1/19/95Demo
2 -
3 -
4 - 1/26/95Demo

The print.h file contains a complete list of the routines. Some of the more commonly used routines are:

  • PrintAREntryIdList
  • PrintAREntryListFieldList
  • PrintAREntryListFieldStruct
  • PrintAREntryListList
  • PrintAREntryListStruct
  • PrintARFieldValueList
  • PrintARInternalIdList
  • PrintARNameList
  • PrintARPermissionList
  • PrintARQualifierStruct
  • PrintARStatusHistoryList
  • PrintARStatusList
  • PrintARStatusStruct

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Helix Innovation Suite 25.3