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...

Can we move SPACES to numeric field and ZEROES to
alphabetic field? If yes what are the way doing this?

Answer Posted / siva

yes, we can move accordingly thru REDEFINES clause.
Example :
01 WS-A PIC 9(5).
01 WS-AR REDEFINES WS-A PIC X(5).
01 WS-B PIC A(5).
01 WS-BR REDEFINES WS-B PIC X(5).


MOVE 12345 TO WS-A.
MOVE SPACES TO WS-AR.
MOVE 'ABCDE' TO WS-B.
MOVE ZEROES TO WS-BR.

WS-A, WS-AR contains spaces and WS-B, WS-BR contains
zeroes.

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats the difference between search & search ALL?

6666


how do you define single dimensional array and multidimensional array in your cobol?

1151


What are declaratives and what are their uses in cobol?

1262


What is the difference between external and global variables in COBOL?

1545


What is a report item?

1196


how can i see junk values in dclgen or in hostvariable of comp ?

3052


What is the difference between next sentence and continue in cobol programing language?

1278


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

3278


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

921


How do get the result of your program directly on your pc?

2397


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

1219


What kind of error is trapped by on size error option?

1293


Why did you choose to work with ibm mainframe cobol programming?

1162


What is difference between static and dynamic call in cobol?

1467


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1310