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

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top