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: 241
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 find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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