• Image 1
  • Image 2
  • Image 3
  • Image 4
  • Image 5
  • Image 6
  • Image 7




Tuesday, August 28, 2012

COBOL PICTURE EDITING AND CLAUSE - TUTORIAL FOR NEWBIE


Hello my friend IT program lover… You are on my blog at “We Are Knowledge”.. If you reading my article You will getting many IT knowledge in here. Likely this article.. this article discuss about “COBOL”. And tutorial about “Picture Clause Dan Editing”.

To be found between Picture Clause Dan Editing.

Picture Clause

>> Useful for determining what data types to use for variables, but this command
can also be used to display or print the form data in the output window


Editing

>> This command is used to change the shape of the data results using picture clause to be printed to the output window, to make it easier to read and more comfortable seeing.


1. Picture Clause


a. Picture character 9
>> used to store or produce data in the form of numerical

Ex :
number PIC 99999.
number PIC 9(5).


b. Picture character A
>> used to store or produce data in the form of the

Ex :
            Name PIC aaaaa.
            Name PIC a(5).


c. Picture character X
>> used to store or produce data in the form of numeric and alphabet

Ex :
            Address PIC x(20)


d. Picture character V
>> for decimal numbers, and can only be used in conjunction with a picture clause 9

Ex :
price PIC 9999V99.             >> 234.50
price PIC 9(5)V9(3). >>     4656.345


e. Picture character P
>> this picture character for to appear value “0”

Ex :
            price PIC 9PPV.  >> 900.


f. Picture character S
>> the picture character using for giving minus sign (-)


1. Picture Editing

a. Picture editing karakter Z.
>> omit the 0 at the front


b. Picture editing karakter $.
>> giving “$” sign


c. Picture editing karakter (.) and (,).
>> giving stops and commas


d. Picture editing karakter “-“.
>> giving minus sign


e. Picture editing karakter “+”.
>> giving minus sign, if the value is positif not giving positif sign


f. Picture editing karakter DB and CR.
>> commonly used to model accounting


g. Picture editing karakter “B”.
>> operator inserts blank where "B" is located


h. Picture editing karakter “*”.
>> this picture editing for change “0” with “*” sign


i. Picture editing karakter “0”.
>> insert the character 0 (zero)


j. Picture editing karakter “/”.
>> insert character /, commonly used for date or time


Ok..just it..
I hope you understand..
See you later

No comments:

Post a Comment