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

hi dudes.....can any one help me..... what is SET TO TRUE all about,anyway?

1 Answers  


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.

0 Answers   iNautix,


how to display date in reverse order if the pic clause of the is numeric suppose date is 09032010 ==> need to print in 20100309 (pic clause is numeric)

6 Answers  


Can the OCCURS clause be at the 01 level?

8 Answers   Oracle,


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

0 Answers  


1.What is the default print format in cobol?

5 Answers   HSBC,


Have you code any new programs in COBOL ? What is the functionality of the programs?

2 Answers   Patni, Xansa,


What is the difference between a DYNAMIC and STATIC call in COBOL?

2 Answers  


Should I use STOP RUN in the sub program??why?

6 Answers   Xansa,


How can you add a particular field/coloumn in copybook?

3 Answers   ADP, DELL, L&T,


I want ALL jcl ERROR cods

1 Answers  


I have a file it contain 10 records.i got abend at 8th record because of soc7.how do you know that perticular record got abend?

3 Answers   IBM,


Categories