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 Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


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