Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

iSeries / AS400 FAQ : Programming : RPG : What does BINARY(4) mean in API documentation?

0
Posted

iSeries / AS400 FAQ : Programming : RPG : What does BINARY(4) mean in API documentation?

0

BINARY(4) means a 4-byte binary number. In RPG III, this means a subfield of a data structure that is defined with 4 bytes, and has the ‘B’ type. In RPG IV, there are two kinds of 4-byte binary number: the 10-digit integer or the 9-digit binary. The 10-digit integer is better when dealing with APIs. If you define an integer or binary number using length notation (no from-position), you give the number of digits. 10I-0 or 9B-0. A very common error is to define a BINARY(4) field or parameter using length notation as 4B-0. This always causes problems calling the API.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.