Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

77 a pic x(4) value '1234' -----> instead of this 'abcd'
77 b pic 9(4) value zeros.
move a to b
what is the answers for both cases?
IS it possible? Give me elementary move rules briefly......

Answer Posted / satish kumar

hello all, yes it is possible to move alphanumeric to
numeric but not numeric to alphanumeric.if we are moving
alphanumeric character "abcd" to numeric. The compiler
accepts the first three characters as same and the remaining
last character it takes ascii value/code of last character 'd'.

pgm1: 77 a pic x(4) value "abcd".
77 b pic 9(4) value zeros.
move a to b.
o/p: abc4

pgm2: 77 a pic 9(4) value 1234.

77 b pic x(4).
move a to b.
o/p: 1234

in this case the compiler can move the numeric values to
alphanumeric directly.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you differentiate between cobol and cobol-ii?

1213


what is the use of outrecord?

2222


Explain what you understand by passing by value.

1157


What is report-item in COBOL?

1156


In COBOL programming, what is PERFORM? What is VARYING?

1152


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

1358


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

4173


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?

7897


How do you reference the following file formats from cobol programs?

1164


) How do u handle errors in BMS macro

2053


What rules are followed by the search verb.

1119


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

2011


What is a scope terminator give example?

1114


What are the different data types in cobol?

1448


what is the difference between COBOL2 AND COBOL390?

3058