Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Redefines from AlphaNumeric to Numeric

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
brahmanandareddy

New User


Joined: 16 Dec 2004
Posts: 44
Location: Hyderabad

PostPosted: Mon Feb 28, 2005 12:59 pm    Post subject: Redefines from AlphaNumeric to Numeric
Reply with quote

see the following code

01 WS-VAR1 PIC X(10).
01 WS-VAR2 PIC 9(20) REDEFINES WS-VAR1.
.
.
MOVE 'BREDDY' TO WS-VAR1.
DISPLAY WS-VAR1.
DISPLAY WS-VAR2.
.
.
What would be the results in the above case?
Is it possible to redefine variables with different pic clauses as above (does it give error)?


01
77
49
66
of the above items for which redefines cannot be used?
Back to top
View user's profile Send private message

anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Mon Feb 28, 2005 3:43 pm    Post subject:
Reply with quote

Hi BrahmanandaReddy,

Hope you asked this question already.Please take care not to post same queries more than once.
Back to top
View user's profile Send private message
muthukumarapandian

New User


Joined: 08 Oct 2004
Posts: 42
Location: chennai, india

PostPosted: Tue Mar 01, 2005 9:28 am    Post subject:
Reply with quote

hI REDDY,

no it wont throw any error.
Back to top
View user's profile Send private message
sunnyk

New User


Joined: 20 Oct 2004
Posts: 59

PostPosted: Tue Mar 01, 2005 7:55 pm    Post subject:
Reply with quote

Hi,
The result would be:

For WS-VAR1 : BREDDY$$$$ where $ means spaces.
For WS-VAR2 : 00000000000000BREDDY.

Only for level 66 redefines can`t be used.

Thanks
sunny
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us