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

Problem in Movement of Data


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

New User


Joined: 05 Nov 2014
Posts: 95
Location: India

PostPosted: Fri Apr 10, 2015 6:33 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Apr 10, 2015 8:58 pm
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Apr 10, 2015 9:51 pm
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 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 Map Vols and Problem Dataset All Other Mainframe Topics 2
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