O'Reilly logo

APIs at Work, Second Edition by Ron Hawkins, Doug Pence, Bruce Vining

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pass the Data, Please...

To use a callable API, you simply code an appropriate call statement. Most APIs pass information back and forth by parameters. It’s important to understand how these parameters work. Table 1.1 provides an example of how parameters are documented in the Information Center.

Table 1.1. Parameters for the Retrieve Output Queue Information API (QSPROUTQ)
ParameterDescriptionTypeSize
1Receiver VariableOutputChar(*)
2Length of Receiver VariableInputBinary(4)
3Format NameInputChar(8)
4Qualified Output Queue NameInputChar(20)
5Error CodeI/OChar(*)

Since APIs can be called by developers using various languages, such as RPG, CL, COBOL, and C, the Information Center normally documents API parameters in a language-neutral fashion. Rather ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required