01 a pic s9(5) value '-12345' how it will be stored

Answer Posted / gopal chand

01 a pic s9(5) value '-12345' how it will be stored

It will be stored :
1234u

In data files Negative Values are Stored as per the
following manner

0-p 1-q 2-r 3-s 4-t 5-u 6-v 7-w 8-x 9-y

The Last Digit of the No. is stored like this in the
following example.

Example: 01 a pic s9(4)v99

move -3456.23 to a.
display a.
Output is : 34562s

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Discuss about changing dataset name in proc.

757


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2104


How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?

700


Name the sections present in data division.

697


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

1950






What are the rules of the move verb?

701


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

672


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

639


How do we get current date from system with century in COBOL?

796


how do you reference the ksds vsam file formats from cobol programs

660


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2656


What is inspect in cobol ?

797


What is the difference between a binary search and a sequential search what are the pertinent cobol?

729


What rules are to be followed while using the corresponding options?

632


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1799