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
 

 

Question on output layout

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

New User


Joined: 01 Sep 2005
Posts: 10
Location: Bangalore

PostPosted: Fri Apr 14, 2006 6:38 pm    Post subject: Question on output layout
Reply with quote

Hi

I have one input file which is like this


ACC NO NAME SAL
-100 AAAA 2000
-200 BBBB 5000
-300 CCCC 3000

OutpuT layout

ACC NO NAME SAL

100 AAAA 2000
200 BBBB 5000
300 CCCC 300

I don't want - in output layout
]how can i do this
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Apr 14, 2006 7:21 pm    Post subject: Re: Question on out put layout
Reply with quote

yadagiri.p,

Your input filecopybook is probably something like:

Code:

    05  ACC-NO       PIC S9(3).
    05  NAME         PIC X(5).
    05  SAL          PIC 9(5).


Change the output to:

Code:

    05  ACC-NO       PIC 9(3).
    05  NAME         PIC X(5).
    05  SAL          PIC 9(5).


(remove the sign from ACC-NO)

Dave
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Apr 15, 2006 7:14 am    Post subject:
Reply with quote

But remember, you can't do a group move (i.e. input to output). You have to move the ACC-NO separately to realize the sign conversion.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 239
Location: Cincinnati OH USA

PostPosted: Sat Apr 15, 2006 9:57 pm    Post subject:
Reply with quote

just a thought

perhaps it's not a sign, but the ANSI triple space carriage control character.

SORT copy OUTREC can be used to strip it if not needed.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Apr 15, 2006 11:29 pm    Post subject:
Reply with quote

Just another thought,

I noticed that the sign is shown as leading. Is it separate? If so, you can use something like this:
Code:
 FD IP-FILE.
01  IP-REC.
    05  IR-SIGN    PIC  X(001).
    05  IR-DATA    PIC  X(013).

FD OP-FILE.
01  OP-REC         PIC  X(013).


READ IP-FILE
WRITE OP-REC FROM IP-DATA
This poses an interesting ques. Can you WRITE FROM a field that's not an 01 level. The manual seems to say "not". I've never tried it. Has anybody?

If not, you'll have to do the move to OP-REC yourself.
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 Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm
This topic is locked: you cannot edit posts or make replies. output data in CSV Format janmejay DFSORT/ICETOOL 3 Sat Oct 15, 2016 2:16 pm


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