View previous topic :: View next topic
|
Author |
Message |
prafull
New User
Joined: 08 Dec 2006 Posts: 48
|
|
|
|
I have a requirement in which I need to add trailer records in present files
Mem1, mem2, mem3??..mem284 are all members of USER.NOTOTAL.PDS and all have same record structure.
New_mem1, new_mem2, new_mem3??. new_mem284 are all member of USER.TOTAL.PDS and all have same record structure.
FILE mem1 is like:
A10
B20
C10
D05
The output file new_mem1 should be:
A10
B20
C10
D05
T-45
I wrote one program to achieve this.
( this could be done using SORT but the actual total calculations are complex (not shown here) so I had to write a program. )
Now I want to do this for all other members mem2 - new_mem2, mem3 - new_mem3 ?mem284 - new_mem284.
Is it required to code 284 steps ?
Is there any way by which I can read all members of input PDS (USER.NOTOTAL.PDS) one by one and create its corresponding output member in new PDS (USER.TOTAL.PDS)? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What is the "actual total calculation"? |
|
Back to top |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
I do not know how you are writing the trailer record but you can always use REXX to do such processing, which is very fast and least cumbersome.
You can find a good manual on REXX by name ikj4c310 in the public boulders. |
|
Back to top |
|
|
prafull
New User
Joined: 08 Dec 2006 Posts: 48
|
|
|
|
Quote: |
What is the "actual total calculation"? |
The total is not mere sum of records as I have shown.It's for simplicity.
We calulate total by multiplying the numbers in records by different rate(s) which are present in other file(s).Please note ,I have to write a Cobol program for this. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You'll want to use the ISPF Library Management (LM) Services. Specifically, the LMINIT, LMMLIST, LMGET, and LMPUT services. |
|
Back to top |
|
|
|