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: 79
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: 1246
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: 7272

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 JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm


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