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
 
move numeric data to alphanumeric field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: move numeric data to alphanumeric field
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: Chennai

PostPosted: Fri Jan 30, 2009 4:15 pm    Post subject:
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: 8152
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jan 30, 2009 5:51 pm    Post subject:
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    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 Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm

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