It is my understanding that below is how you define a binary variable of length 2 in rpg IV D specs. How do you make the same definition in RPG FREE D SPECS?
Thanks, Any idea what I may be doing wrong since I cannot find information in this same manual? Big help today. Thanks again.
Member_2_276102
The link that Gary provided goes directly to the information. It's not clear how it's possible that you "cannot find" it. Just click the link. When it opens, the navigation pane on the left shows how to locate the information.
However, you almost certainly do not want to use a BINDEC() variable. Those are not exactly equivalent to the fixed-form "5i 0" that you showed in your question. BINDEC() variables would be the equivalent to the old "B" data type that really should never be used unless you are certain you really need it.
Instead, you most likely want the Integer Format. The specification is described in the INT(digits) topic. The example in the documentation shows a maximum 10-digit integer. Your question asks about a 5-digit integer, so you would use:
Tom's exactly right, of course. Not sure how I got it in my head that you were looking for "B" type when the question directly asks for "I". Sorry about the confusion.
@Gary: No problem. BINDEC() would probably work, but you never know when a future code change could bring a lot of confusion for some maintainer who didn't know what the "B" data type really was, eh?. -- Tom