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

Describe the cobol database components?

776


What guidelines should be followed to write a structured cobol prgm?

766


What is the difference between perform … with test after and perform … with test before?

1002


example for sub strings ? and refernce modifications whit output pls

1948


how to convert the recors form vsam file to db2 table tru file aid

2853






What is the default value(s) for an initialize? What keyword will allow for an override of the default?

752


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

847


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1717


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2837


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1220


A table has two indexes defined. Which one will be used by the SEARCH?

873


What is the usage of comp fields in cobol?

753


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1311


How to print 10 to 1 if the input have only 10 digit number?

919


How to use the same COBOL program in Batch and CICS on lines? explain with an example

2007