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
 
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: 1249
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: 7315

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: 2504
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 LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 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
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

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