View previous topic :: View next topic
|
Author |
Message |
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Hi,
I need to create a report ( of length 80 bytes ) which has the header as shown below
EFTS ISSUE REPORT
FOR CREDITOR INS POLICY
AS OF <Deposit Date>
The report should have following columns
ACCOUNT NUMBER CONTROL NUMBER DEPOSIT AMOUNT
12345678 xxxxxx-xx $10.00
23456789 xxxxxx-xx $20.00
TOTAL: $30.00
Input file details:
My input file has two records like this
ACCOUNT NUMBER
12345678
CONTROL NUMBER
xxxxxx-xx
DEPOSIT AMOUNT
10 ( THIS IS A COMP3 FEILD )
DEPOSIT DT
10/10/2008
Can some one pls advise ?? No ICETOOL pls. We are not allowed to move ICETOOL to production.
Thanks |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
My input file has two records like this |
It's difficult to figure out the layout of your input fields the way you've shown them. Please give the starting position, length and format of each of the ACCOUNT NUMBER, CONTROL NUMBER and DEPOSIT AMOUNT input fields.
Also, give the starting position and length of each value in the report. Is $10.00 supposed to be left justified or right justified under the heading? Is the value always $xx.xx or can it be $xxx.xx or $x.xx as well. Do a better job of explaining what that field should look like in the report for different length values if allowed.
In the future, please use ubb code tags where appropriate. |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Hi,
Sorry for inconvenience.
Here is the required information
ACCOUNT NUMBER - starts from position 1
CONTROL NUMBER - starts from position 10
DEPOSIT DT - starts from position 19
DEPOSIT AMOUNT - starts from position 29
Rest all is filler. The lay out of input file is FB, 80 Bytes.Output file has the same attributes as input. |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
DEPOSIT AMOUNT is a COMP3 feild of length S9(7 ) comp-3.
ACCOUNT NUMBER is PIC X(9)
CONTROL NUMBER is PIC X(9)
DEPOSIT DT is PIC X(10)
Thanks |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Also, all the output feilds start under the headings. The $10.00 can be $XXXX.XX . if the value is 10, then it should look like $10.00, if it is 130, then it should look like $130.00. This feild has to be left justified.
thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If this is really a report, i suggest the aligning the decimal point will make the output much more readable (rather than left-justified). . . |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
ap,
You can use a DFSORT job like the following to do what you asked for. I agree with Dick that left justifying the amount field makes no sense, so I right justified it.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
OUTFIL HEADER1=(46:'EFTS ISSUE REPORT',/,
40:'FOR CREDITOR INS POLICY',/,
47:'AS OF ',19,10,/),
HEADER2=('ACCOUNT NUMBER',24:'CONTROL NUMBER',
45:'DEPOSIT AMOUNT'),
BUILD=(1,9,24:10,9,51:29,4,PD,EDIT=($IIIT.TT),80:X),
TRAILER1=(44:'TOTAL: ',TOT=(29,4,PD,EDIT=($IIIT.TT)))
/*
|
For your input example, SORTOUT would have:
Code: |
EFTS ISSUE REPORT
FOR CREDITOR INS POLICY
AS OF 10/10/2008
ACCOUNT NUMBER CONTROL NUMBER DEPOSIT AMOUNT
12345678 xxxxxx-xx $10.00
23456789 xxxxxx-xx $20.00
TOTAL: $30.00
|
If that isn't quite what you want, you can play around with the control statements. |
|
Back to top |
|
|
|