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
 

 

How to write a comp-3 field read from a record in to another

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

New User


Joined: 15 Nov 2005
Posts: 15
Location: chennai

PostPosted: Thu Jan 17, 2008 8:21 pm    Post subject: How to write a comp-3 field read from a record in to another
Reply with quote

my doubt is :

i have a field in the copy book like this:
10 AP-PTD-DISB-NET PIC S9(7)V99 COMP-3.
what i need is:

read the field AP-PTD-DISB-NET from the input file and i have to write it in to O/P file (to the field AP-PTD-INVOICE-DATE-07).
Its value in the input file is +64.00.
i want the same value in the output file.Also suggest me how to declare
AP-PTD-INVOICE-DATE-07 in O/p file layout.
Please help me
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Jan 17, 2008 8:25 pm    Post subject:
Reply with quote

Define it in the O/P EXACTLY as it is defined in the I/P, using the O/P var name you stated. Then MOVE I/P fld TO O/P fld.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jan 17, 2008 8:26 pm    Post subject: Re: How to write a comp-3 field read from a record in to ano
Reply with quote

krishnakumarramaraj wrote:
my doubt is :

i have a field in the copy book like this:
10 AP-PTD-DISB-NET PIC S9(7)V99 COMP-3.
what i need is:

read the field AP-PTD-DISB-NET from the input file and i have to write it in to O/P file (to the field AP-PTD-INVOICE-DATE-07).
Its value in the input file is +64.00.
i want the same value in the output file.Also suggest me how to declare
AP-PTD-INVOICE-DATE-07 in O/p file layout.
Please help me


I can't believe this.

AP-PTD-INVOICE-DATE-07 PIC S9(7)V99 COMP-3.

MOVE AP-PTD-DISB-NET TO AP-PTD-INVOICE-DATE-07.
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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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