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

move numeric data to alphanumeric field


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

New User


Joined: 17 Sep 2008
Posts: 41
Location: Chennai

PostPosted: Fri Jan 30, 2009 4:07 pm
Reply with quote

I have two inputs both going to the same destination ouput field.

05 in1 PIC ZZ.ZZZ
05 in2 PIC x(6)
05 out PIC X(10)

Move in1 to out does not work and gives me compilation error.
How can I achieve this.
thnks for the help.
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Fri Jan 30, 2009 4:15 pm
Reply with quote

you can't acheive it as such
Quote:
05 in1 PIC ZZ.ZZZ


Try
Code:
05 in1 PIC S9(2)V9(3)


But Beware that you can't do arithmetic operation with OUT variable.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jan 30, 2009 5:51 pm
Reply with quote

Code:
05  IN1 PIC ZZ.ZZZ.
05  IN1-R REDEFINES IN1
         PIC X(06).
.
.
.
    MOVE IN1-R TO OUT.
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 Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top