IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

comparing alphanumeric fields of unequal length


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pghiii

New User


Joined: 23 Aug 2005
Posts: 1
Location: Greenville, SC

PostPosted: Wed Aug 24, 2005 12:16 am
Reply with quote

Have some discussion going on in the office re. the results of comparing a 1-byte alpha field with a 2-byte constant with leading space. Specifically we are getting the compiler warning for the following:
WPUM365C-USER-TYPE PIC X.

IF USER-TYPE-CHANGED
IF WPUM365C-USER-TYPE EQUAL SPACES
The result of the comparison of operands WPUM365C-USER-TYPE and L is
known at compile time, based on the attributes of the operands.
Unconditional code was generated.
OR (WPUM365C-USER-TYPE EQUAL 'L ' OR ' L')
MOVE WPUM365C-USER-TYPE TO CM-USER-TYPE-REQUEST
ELSE
MOVE -1 TO WPUM365D-USER-TYPE-L
MOVE 2 TO WPUM365D-USER-TYPE-H
WPUM365D-USER-TYPE-C
MOVE ' LEAD MUST BE BLANK OR L(LEAD USER)' TO
WS-SAVE-MESSAGE
PERFORM 9000-ERROR THRU 9000-ERROR-EXIT.

I don't see why it's unconditional.
Back to top
View user's profile Send private message
sendil

New User


Joined: 30 Jun 2005
Posts: 27

PostPosted: Thu Aug 25, 2005 1:56 pm
Reply with quote

Could you please send some more clear details.......


Thanks
sendil
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
Search our Forums:

Back to Top