IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to add trailers to PDS members


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prafull

New User


Joined: 08 Dec 2006
Posts: 48

PostPosted: Wed Jun 13, 2007 2:28 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Jun 13, 2007 2:40 pm
Reply with quote

What is the "actual total calculation"?
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Wed Jun 13, 2007 2:41 pm
Reply with quote

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
View user's profile Send private message
prafull

New User


Joined: 08 Dec 2006
Posts: 48

PostPosted: Wed Jun 13, 2007 2:51 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jun 13, 2007 6:57 pm
Reply with quote

You'll want to use the ISPF Library Management (LM) Services. Specifically, the LMINIT, LMMLIST, LMGET, and LMPUT services.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts REXX editmacro to compare two members... CLIST & REXX 7
No new posts Easy way to delete selected members f... IBM Tools 12
No new posts To find an array of words (sys-symbol... JCL & VSAM 9
Search our Forums:

Back to Top