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
 
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm

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