Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Comparison b/n Alphanumeric and numeric

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

New User


Joined: 18 Dec 2008
Posts: 15
Location: Hyderabad

PostPosted: Wed Nov 17, 2010 3:38 pm    Post subject: Comparison b/n Alphanumeric and numeric
Reply with quote

Hi all,

I have the below piece of code

Code:
WORKING-STORAGE SECTION.                         
01 WS-NAME         PIC X(1) VALUE SPACES.         
01 WS-NUM          PIC 9(3) VALUE ZEROS.         
PROCEDURE DIVISION.                               
    MOVE 'Y' TO WS-NAME.                         
    MOVE 'APP' TO WS-NAME1.                       
    MOVE 9   TO WS-NUM.                           
    IF WS-NAME > WS-NUM                           
       DISPLAY WS-NAME                           
    ELSE                                         
        DISPLAY WS-NUM                           
    END-IF.                                       
    STOP RUN.               


For the above program the result is as below
****
009
****

Can someone pls explain how internal comparison will be done b/n alphanumeric and numeric datatypes.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Nov 17, 2010 3:48 pm    Post subject:
Reply with quote

Quote:
MOVE 'APP' TO WS-NAME1.


you have a choice. explain what this statement has to do with anything
or
RTFM.

this question belongs in the beginners forum.
Back to top
View user's profile Send private message
sriraj1122

New User


Joined: 18 Dec 2008
Posts: 15
Location: Hyderabad

PostPosted: Wed Nov 17, 2010 4:06 pm    Post subject:
Reply with quote

does this website has special forum for beginners ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Wed Nov 17, 2010 4:48 pm    Post subject:
Reply with quote

http://www.ibmmainframeforum.com is specifically for beginners.
Back to top
View user's profile Send private message
sriraj1122

New User


Joined: 18 Dec 2008
Posts: 15
Location: Hyderabad

PostPosted: Thu Nov 18, 2010 10:02 am    Post subject:
Reply with quote

Thnx a lot Robert!!
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
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us