Hi Crox !
What are these f1f2f3? what does the f stands for?Also in this convention how does 0 represented?
please pardon me if you see this as a silly question.
The F's in this description are hexademical F's. In EBCDIC on the IBM mainframe, the internal code for the characters 0-9 are F0-F9. (In ASCII, it's 30-39.) Since the F's (or 3's) aren't really conveying any useful information when we already know that the field is being treated as a number, the F (or 3) from the high-order half-byte of the last character of the field is changed to a different value to indicate the sign, positive or negative. That is why the S in the picture clause does not take up any additional room. Hope this helps.
I've just recently started learning COBOL. Thanks very much for that explanation. Here's a Tip Vote from me. "When the night has been to lonely, and the road has been too long." then you need to go to bed. (Quote is from the movie/soundtrack "The Rose"
Actually HRayT, a picture clause of S9(7) will occupy 7 bytes, as well as PIC S9(9) taking up 9 bytes. This is the case unless the numeric fields are defined as comp or comp-3, etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.