Page 1 of 1

cobol report more than 133 column implementation

PostPosted: Tue Feb 24, 2009 1:12 pm
by puneet shukla
Hi All,

I have follwing requiremt in cobol.

input file

country PIC X(2)
Branch No PIC X(2)
Customer No PIC X(5)
order number PIC X(8)
AMT PIC S9(15)V99 COMP-3
Date-1 PIC S9(05) COMP-3
Date-2 PIC S9(05) COMP-3
NET-pay PIC S9(15)V99 COMP-3

Now i have requirement in code

if country code( row1,row2....rown) = ws-country code (row2....rown)
Customer No ( row1,row2....rown) = Ws-Customer No( row2,row3....rown)
order number( row1,row2....rown) = WS-order number(( row2,row3....rown)

compute Net Pay = order number(row1) + ws-order number
else order number = orginal order number


some example :
Branch No  Date-1    Customer No   Date-2   order number   AMT          Net -pay         Net-value
7          08/01/09  puneet 123    13/10/08     07-08001-17    429163.35    429163.4         429163.4
7          08/01/09  puneet 123    13/10/08     07-C6279-62   -413825        -413825            0
7          08/01/09  puneet 123    13/10/08     07-C6279-62   219284.87     -194540           0
7          08/01/09  puneet 123    13/10/08    07-C3555-69    -300              -300               0

in this query main calculation is net pay and net value

net pay is calcultaed if branch no(row1..rown) = branch(row2....rown) and customer no(row1..rown)=customer no(row2..rown) and order number (row1..rown) = order number (row2..rown)

refer above example

Re: cobol report more than 133 column implementation

PostPosted: Wed Feb 25, 2009 1:43 am
by dick scherrer
Hello and welcome to the forum,

I'm not sure why the 133 is a concern - an output file may be much longer than 133.

It will help if you post some sample output (rather than only the description of the layout) you want from that sample input.

Your requirement is completely clear to you, but may not be to others who read it.

Suggest you practice with the "Code" tag as well as the Preview. This will let you see your post as the forum will see t rather than how it appears in the Reply editor. Code preserves alignment. I "Code"d and aligned part of your data as an example.