Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
anilbhuvan

New User

Joined: 18 Nov 2006
Posts: 4

 Posted: Wed Aug 01, 2007 11:43 am    Post subject: Can we move Alphanumeric data to Numeric Variable HI FRNDS, i have 01 A PIC X(2). 01 B PIC 9(2). MOVE 12 TO A. MOVE A TO B. I KNOW THAT I CAN PASS NUMERIC TO NON-NUMERIC BUT IN THIS CASE HOW CAN IT BE PASSED AS NUMERIC OR NON-NUMERIC..... I KNOW ITS BASIC ONE BUT I WANT UR HELP AS I WAS CONFUSED..... Warning: Caps Lock On

murmohk1

Senior Member

Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

Posted: Wed Aug 01, 2007 12:00 pm    Post subject: Re: CAN WE MOVE ALPHANUMERIC DATA INTO NUMERIC FIELD......

Anil,

 Quote: BUT IN THIS CASE HOW CAN IT BE PASSED AS NUMERIC OR NON-NUMERIC..... I KNOW ITS BASIC ONE BUT I WANT UR HELP AS I WAS CONFUSED.....

I dont know you are confused or not. But your post surely is confusing. Please post your exact requirment.

 Quote: MOVE 12 TO A.

Also let us know, is it atypoerr?

Active User

Joined: 20 Sep 2006
Posts: 154
Location: US

Posted: Wed Aug 01, 2007 12:00 pm    Post subject:

hi anil ,

Use the below code

 Code: COMPUTE B = FUNCTION NUMVAL(A)

Thanks
Sai
chtrisa

New User

Joined: 19 Dec 2006
Posts: 12
Location: chennai

 Posted: Wed Aug 01, 2007 5:23 pm    Post subject: hi anil, i think, redefine the B(numeric) field, then u can move non mumeric value to B.
agkshirsagar

Active Member

Joined: 27 Feb 2007
Posts: 686
Location: Earth

Posted: Wed Aug 01, 2007 5:37 pm    Post subject:

 Code: Move '12' to A

This moves literal '12' to A and your move will move 12 to A. (Check the apostrophes.)
I think you are confused in diffrentiating numeric and alphanumeric literals.
balakrishna reddy

Active User

Joined: 13 Jul 2007
Posts: 130
Location: Guntur

Posted: Thu Aug 02, 2007 7:30 pm    Post subject:

hi anil,

anil wrote:
 Quote: I KNOW THAT I CAN PASS NUMERIC TO NON-NUMERIC BUT IN THIS CASE HOW CAN IT BE PASSED AS NUMERIC OR NON-NUMERIC..... I KNOW ITS BASIC ONE BUT I WANT UR HELP AS I WAS CONFUSED.....

I think that you are talking about the second move whether numeric value will be moved to 'B' or alphanumeric.

you are moving '12 ' to alphanumeric first since it is in codes it will be treated as alphanumeric.

when you move A to B it will be moved fine and you can use B for any arithmetic operations as well.
dick scherrer

Site Director

Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

 Posted: Fri Aug 03, 2007 12:20 am    Post subject: Hello, You might want to look at these similar topics: http://ibmmainframes.com/viewtopic.php?t=22367 http://ibmmainframes.com/viewtopic.php?t=21201 http://ibmmainframes.com/viewtopic.php?t=18093 If you "search" using the link near the top of the page, you will find several more topics. If after reading them you have any questions, please post what you read that is unclear and your question about it and we will provide more answers.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Invalid XML character while producing... nikhil.bhole IBM Tools 0 Tue Mar 20, 2018 1:24 am Get the list of data sets on DASD and... rakaitn JCL & VSAM 3 Thu Mar 08, 2018 12:38 pm RMM Cannot move a volume from SHELF l... tspr52 IBM Tools 0 Thu Mar 01, 2018 3:48 pm Data security erase on RAID device steve-myers All Other Mainframe Topics 0 Sat Jan 13, 2018 6:41 am Append the milliseconds to the data s... girishb2 DFSORT/ICETOOL 1 Thu Dec 21, 2017 9:07 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us