01 ws-p pic 9(2).
01 ws-q pic 9(2) value 01.
01 ws-r pic 9(2) value 99.

p.d.

compute p = q + r
what will be result of p ans(00) but my question is that

how i got 10 on the place of 00.
(truncation will ocuure on right side not left).

please tell me ?


Answer Posted / minhaj

p = q+r actuall result is p = 10 but u want p = 10 so we
right the code as p = q+r justified right

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2101


what is search and searchall?what is the diffrence between them?give an best example?

5563


How do you define a variable of comp-1 and comp-2?

707


Which mode is used to operate the sequential file?

671


What is amode(24)?

684






how can i see junk values in dclgen or in hostvariable of comp ?

2546


Write some characteristics of cobol as means of business language.

622


What are the various section in data division and briefly explain them.

700


What are literals?

632


Write the code to count the sum of n natural numbers.

704


What do you understand by psb and acb?

668


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5065


What is rmode(24)

683


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

859


) what is the difference between AID and HANDLE AID?

1637