Hi All,
Can anyone tell me how we can MOVE value of a X(19)
variable to a S9(17) COMP-3 variable?
Answer with an Example will be of great help.
Answer Posted / vamsi
First of all s9(17) comp-3 will occupy 9 bytes and X(19) has
19 bytes of memory.
When we move the text value to an comp-3 field, we will get
Soc7 error. We cannot move alpha values to numeric fields.
If the X(17) contain numeric values then we can move this
field to s(17) comp-3 field and we can move only 9 bytes
other data will be trucated.
| Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
Mention the guidelines to write a structured cobol program?
How can you get the ksds file records into your cobol program?
What are the different rules to perform a Search?
How to print 10 to 1 if the input have only 10 digit number?
What is the difference between structured cobol programming and object alternativelyiented cobol?
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
What is comp-1 and comp-2?
) How do u handle errors in BMS macro?
Write the code to count the sum of n natural numbers.
What are various search techniques in cobol? Explain.
What is the difference between Global and External Variables?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
Explain how to differentiate call by context by comparing it to other calls?
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.