how to display comp3 variables reply soon ?

Answers were Sorted based on User's Feedback



how to display comp3 variables reply soon ?..

Answer / fjord

01 ws-a pic s9(5) comp-3 value 12345.
01 ws-b pic s9(5).

Procedure division.

move ws-a to ws-b
display ws-b upon terminal.

Is This Answer Correct ?    16 Yes 0 No

how to display comp3 variables reply soon ?..

Answer / chandra

SELECT ACCT-FILE ASSIGN TO UT01.
01 A pic s9(5)comp-3 value 12345.
01 ACC-REC.
02 B pic s9(5)comp-3.
02 FILLER X(77).
PD.
OPEN ACCT-FILE.
MOVE A TO B.
WRITE ACC-REC.
BROWSE THE FILE AND WRITE HEX ON IN THE COMMAND PROMPT THEN
PRESS ENTER....IT WILL SHOW U THE COMP-3 VALUE.....

Is This Answer Correct ?    7 Yes 4 No

how to display comp3 variables reply soon ?..

Answer / lovely.surendra

just use a another ws-variable and then move the value of
COMP variable into it,

now u can do any activitity with this ws-variable.

Is This Answer Correct ?    3 Yes 0 No

how to display comp3 variables reply soon ?..

Answer / sachin

you can also do this using the jcl sort

inrec = (1,4,pd,m4)

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

At the minimum, which division of COBOL is enough to be coded?

3 Answers   CTS,


can i give 9(10) in comp 3 instead of s9(10) ? if i can give wht would be ths ans

2 Answers   DELL,


How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?

1 Answers  


01 a pic 9(6) value is 123456 01 b pic 9(3) move a to b wht will be the value ?

6 Answers   Patni,


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

0 Answers  






What divisions, sections and paragraphs are mandatory for a COBOL program?

8 Answers   Arigo Infotech,


What is the difference between copy and include in cobol?

1 Answers  


What guidelines should be followed to write a structured Cobol program?

1 Answers  


What is the difference between static call & Dynamic call?

2 Answers   CSC, TCS,


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

0 Answers  


select TURE Statement(s) aboUt eject statemenet in cobol? a)The eject statememnt must be the only statement on the line b.It causes the program to edit abnormally c. eject statement can be written in either area A or area B d. specifies that the next source statement is to be printed at Top of the next page e.The EJECTstatement has no effect on the compilation of the source program itself

2 Answers  


01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. what would be the value of yyy

13 Answers   HSBC,


Categories