Sending data is aplhabetic size 7 (value 3000), I wantated
this value to be stored in database, which is defined as
s9(7)v9(2)comp-3.

Answer Posted / guest1

In the above answer the group contains a PIC clause. It
wrong. Group item should not contain any PIC clause.
01 ws-in-alpha pic x(7).
01 ws-in-numeric redefines ws-in-alpha.
05 ws-data pic 9(7)v99.

01 ws-actual-data pic s9(7)v99 comp-3.

In procedure division,
move ws-in-numeric to ws-actual-data.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to refer the data field?

1812


Discuss about changing dataset name in proc.

762


how do you reference the rrds file formats from cobol programs

800


What is the difference between Call and a Link?

700


What are the access modes of START statement?

719






What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

680


what is the difference between COBOL2 AND COBOL390?

2453


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

710


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

1783


Difference between array and sub-script ?

1167


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1958


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

1614


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2732


How to remove 2 duplicate records and copy only one using job control language?

753


Name the sections present in data division.

701