Reading a PS and printout a Report
Posted: Wed Oct 29, 2008 11:08 pm
Hello Everyone,
I was asked to take an existing report which is already written in Rexx and sort it according to there requirement. I've done some research and noticed that Rexx doesn't have a SORT function. I've tried a few things already out there (i.e. Bubble Sort's and so on) with no luck so I decided to use DFSORT to accomplish this via rexx. Which works great. Now I'm trying to read in the sorted file and print out a report.
Input File (Sample):
IM643367 EFIX000105 20080103 20080103 Baselined G01769 Simple Planned Perm 20080103
IM724307 EFIX000128 20080826 20080826 Baselined G03025 Simple Planned Perm 20080824
40760 APPS001117 20080202 20080202 Baselined GRRATL Simple Planned Perm 20080824
40760 APPS001398 20080202 20080202 Baselined G02382 Simple Planned Perm 20070419
40760 APPS001399 20080202 20080202 Baselined G09483 Simple Planned Perm 20071030
------------- -------------- ----------- ------------ ----------------- --------- -------- ---------------- -----------
(1) (2) (3) (4) (5) (6) (7) (8) (9)
1 = ccnbr, 2 = pknbr, 3 = pinsdte, 4 = ainsdte, 5 = pstatus, 6 = pcreator, 7 = pklvl, 8 = pkgtype, 9 = pkgcdte
Once I read in the input file, I want to be able to break down each field as a variable. Like you would do in COBOL when you define each field of the record.
I know I have to read a record, parse the record (where I got stuck), print report.
I'm just not sure how to accomplish this. Can anyone help with code example.
I was asked to take an existing report which is already written in Rexx and sort it according to there requirement. I've done some research and noticed that Rexx doesn't have a SORT function. I've tried a few things already out there (i.e. Bubble Sort's and so on) with no luck so I decided to use DFSORT to accomplish this via rexx. Which works great. Now I'm trying to read in the sorted file and print out a report.
Input File (Sample):
IM643367 EFIX000105 20080103 20080103 Baselined G01769 Simple Planned Perm 20080103
IM724307 EFIX000128 20080826 20080826 Baselined G03025 Simple Planned Perm 20080824
40760 APPS001117 20080202 20080202 Baselined GRRATL Simple Planned Perm 20080824
40760 APPS001398 20080202 20080202 Baselined G02382 Simple Planned Perm 20070419
40760 APPS001399 20080202 20080202 Baselined G09483 Simple Planned Perm 20071030
------------- -------------- ----------- ------------ ----------------- --------- -------- ---------------- -----------
(1) (2) (3) (4) (5) (6) (7) (8) (9)
1 = ccnbr, 2 = pknbr, 3 = pinsdte, 4 = ainsdte, 5 = pstatus, 6 = pcreator, 7 = pklvl, 8 = pkgtype, 9 = pkgcdte
Once I read in the input file, I want to be able to break down each field as a variable. Like you would do in COBOL when you define each field of the record.
I know I have to read a record, parse the record (where I got stuck), print report.
I'm just not sure how to accomplish this. Can anyone help with code example.