Using an input set of data I need to create a single record control total file. I cannot figure out how to do the whole of this in one step. Perhaps it is not possible and as such I should just write a cobol program ?
DATA IN
< MISC DATA >< AMOUNT FIELD >
2550GBP 0000 000.000N .00
5278GBP 0000 000.000N -6312.19
0019GBP 0000 000.000N -7.16
1101GBP 0636 006.360N 6064.71
1101GBP 0662 006.620N -32609.99
1101GBP 0710 007.100N 217.79
1101GBP 2102 021.020N 290.32
1101GBP 2112 021.120N 3791.76
**************************************************************
AUDIT RECORD TO BE GENERATED
<FLD 1 ><FLD 2><FLD 3 ><FLD 4 ><FLD 5>
091020081124010000008+00000010364.58-00000038939.34N
FLD 1 = DATE AND TIME JOB RAN AT
FLD 2 = RECORD COUNT
FLD 3 = TOTAL CREDITS FROM AMOUNT FIELD
FLD 4 = TOTAL DEBITS FROM AMOUNT FIELD
FLD 5 = EMTPY FLAG - IE. IF RECORD CNT = 0000 THEN SHOULD BE Y
thank you both for your replies. The code you have both kindly provided is exactly what I was looking for though it was not clear to me how to achieve this.
Having seen the statements I'm now going through the code to understand exactly what each means.
This is thankfully going to save a lot of effort writing some noddy cobol programs.