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

What is the problem of ordered sequential files access?

0 Answers  


In a file if a column account number conatain value 0001234.. how can we move the value to another variable without zero. value may contain any type such as 00123405. we need the value 1234 or 12305. how can we do that in cobol. Please help.

1 Answers   CSC,


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

0 Answers  


what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include tempary file used for sorting in assign statement?

3 Answers   TCS,


how many bytes does a s9(12)COMP-4 field occupy?? a.2 b.4 c.8 d.1 ans with reason please

2 Answers  


if we have a 10 steps how to override the 4th step in jcl?

2 Answers   Hewitt,


Differentiate between structured cobol programming and object-oriented cobol programming.

0 Answers  


file status 00 is checked after opening the file or reading the file

4 Answers   John Deere,


What is difference between COBOL and VS COBOL II?.

1 Answers   Winsol Solutions,


TYPES OF SORTINGS. which is more prefarable.

2 Answers   Syntel, TCS,


how to submit a jcl by cobol program. clear me with an example.

3 Answers   HCL,


consider the following two IF statements: IF X AND NOT Y MOVE A TO B IF Z=1 OR 9 MOVE A TO B select one of the following data divusion entries which gives identical results for both the above IF statements a.01 Z PIC 9 88 X VALUE 1.9 88 Y VALUE 0.2 THRU 8 b.01 Z PIC 9 88 X VALUE 0.2 THRU 8 Y VALUE 1.9 c.01 Z PIC 9 88 X VALUE 1.9 88 NOT-Y VALUE 0.2 THRU 1.9 d.none of yhe above

3 Answers   TCS,


Categories