cobol report more than 133 column implementation

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

cobol report more than 133 column implementation

Postby puneet shukla » Tue Feb 24, 2009 1:12 pm

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
puneet shukla
Posts: 1
Joined: Tue Feb 24, 2009 11:44 am
Has thanked: 0 time
Been thanked: 0 time

Re: cobol report more than 133 column implementation

Postby dick scherrer » Wed Feb 25, 2009 1:43 am

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.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Return to IBM Cobol


  • Related topics
    Last post