Picture Clauses in COBOL - Concept Explained

Picture Clauses

Every type of data must have a picture. This determines the type of data that it is.



There is a distinction between the pictures that are used for input (or working storage) fields and those that are used for output fields. The ones used for output fields can be used to edit the output and do things like suppress leading zeroes or replace them by asterisks (for checks).

Input or Working Storage Pictures

X : Alpanumeric. Any character.
A : Letter or Blank.
9 : Digit
V : Assumed decimal point
S : Sign

Output Pictures

X, A, and 9 can be used here also.
B -> Blank
Z -> Zero suppression
0 -> Zero insertion
/ -> Slash insertion eg. for a date.
, -> Comma insertion (big numbers)
. -> decimal point
+ -> forces a sign to appear
- ->sign if negative
CR -> Credit symbol
DB -> Debit symbol
* -> Asterisk instead of leading zeroes.
$ ->Dollar sign

Replies

You are reading an archived discussion.

Related Posts

In the linked representation of a binary tree, additional space is required to store the two links of each node. For leaf nodes, these fields always have nil values as...
Load Rejection Test (Governor Test) The purpose of Turbine Load Rejection Test is to verify and demonstrate the governor function to sustain a load rejection in order to prevent the...
Does anybody here taken a subject strength of materials???😒
[video=youtube;ThMTmWnE6hM]https://www.youtube.com/watch?v=ThMTmWnE6hM&feature=related[/video]
[video=youtube;4Vg-ftPI8TM]https://www.youtube.com/watch?v=4Vg-ftPI8TM&feature=related[/video]