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
 

 

Problem in Movement of Data

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

New User


Joined: 05 Nov 2014
Posts: 78
Location: India

PostPosted: Fri Apr 10, 2015 6:33 pm    Post subject: Problem in Movement of Data
Reply with quote

Hi
I am reading a file which has a field x'001c' at position 17. The declaration in the assembler copybook is
AXBCBKNO DS PL2 PROCESS CENTER NUMBER
I am trying to move this (through reference modification) to a field which is defined as 9(5) . How can I structure the move statements so that I can see '00001' in the output field. Do I need some intermediate moves.

Thanks a lot
Back to top
View user's profile Send private message

Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Fri Apr 10, 2015 6:54 pm    Post subject:
Reply with quote

You shouldn't need reference modification. If the source field is defined as S999 COMP-3 in COBOL and the destination field is 9(5), a simple elementary move should do it.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Apr 10, 2015 8:58 pm    Post subject: Reply to: Problem in Movement of Data
Reply with quote

Yes, reference-modification would be an odd and unworkable way to do that. Define the field as COMP-3 or PACKED-DECIMAL PIC S999 and just MOVE. Give the data a good name (sending and receiving fields) and you never know, someone may be able to follow your code.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Apr 10, 2015 9:51 pm    Post subject: Reply to: Problem in Movement of Data
Reply with quote

This is an example of having a little bit of Assembler knowledge and it would go a long way....
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 Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


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