How to Implement in Cobol



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: How to Implement in Cobol

Postby CICS Guy » Thu Feb 21, 2008 10:32 pm

A, Could you please post the exact requirement? Because I tried to provide an answer and it is not working for you. CICS Guy.
CICS Guy
 
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to Implement in Cobol

Postby dick scherrer » Thu Feb 21, 2008 11:19 pm

Hello,

Also could you please post why you believe that the previous code will not work as intended? (Just out of curiosity )
i believe the 9(02) definitions should be 9(03).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How to Implement in Cobol

Postby arunprasad.k » Fri Feb 22, 2008 3:16 pm

Dick, Yes, I have to used 9(03) if I have to run for 165 occurances. But my sample code has just 3 occurances, so 9(02) can very well accomodate it. Do you still find some errors in my code? I tested my code for all possibility and it is working good.

William Thompson, I asked for the exact code not because I don't know how to build on the logic given by CG, but because I have a few concerns.

CICS Guy, First of all it is not my requirement!! I invited myself just to solve the problem.

If we have input like

_First_Line_
_Second_Line_


Output of the code will have
_First_Line__Second_Line

But it should have been
First_Line_Second_Line


'_' denotes spaces.

Anyway, thank you all guys, Arun. :P
arunprasad.k
 
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to Implement in Cobol

Postby dick scherrer » Fri Feb 22, 2008 8:49 pm

You're welcome :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post