In COBOL, why there is restriction on using something like s9(03).9(02)? Why the complier dos not accept it? Can someone please advise.
OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
2 posts • Page 1 of 1
- Registered Member
- Posts: 14
- Joined: Sat Nov 23, 2013 2:56 am
- Global Moderator
- Posts: 1275
- Joined: Fri Jun 28, 2013 1:22 am
- Location: East Dubuque Illinois
- Has thanked: 2 times
- Been thanked: 90 times
PIC S9(03).9(02) mixes picture symbols in an invalid way. PIC S means the variable has a sign so the values can be negative or positive, while the decimal point means the picture is a numeric edited picture; with numeric edited pictures if you include a sign it needs to be explicitly occupying a position or more (+, -, CR for example). In the Enterprise COBOL V6.1 Language Reference manual, page 207 has a table listing which PICTURE symbols can be combined with the others.
Who is online
Users browsing this forum: CommonCrawl [Bot] and 2 guests