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 Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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