Sean Gleann wrote: >I have a PDS of a reasonable number of FB80 members (>100). Some of the >members have sequence numbers in character positions 73-80, some don't and >some are 'partially' numbered, with gaps in the sequencing, depending on who >last updated the specific member. >I want to replace anything in cols 73-80 with 8 spaces, no matter what is >there.
It should be easy, read cols 1-72 only, copy and pad it 8 space to same member. >I can think of numerous ways of doing something similar with a straight >sequential dataset, but when it comes to an unknown number of members in a >PDS, I get stumped. DFSORT/ICETOOL can do it, I believe a similar example was placed in IBM-MAIN. >My latest attempt featured IEBPTPCH to unload the PDS to a sequential file, >then SORT to write only cols 1-72 from each record to another output file. >That part works fine, but - given that I don't know how many members there >are, nor the names of them - how do I get the serialised members back in to a >PDS? >I'm fairly certain that ICEGENER would be able to do this, ... If there is an ICEGENER example, tell me, please... Or as Peter Hunkeler said, try use REXX, but I will take a slight different approach, because you don't know how large a member can be. Use LISTDS, put list of members, then for each member, do this (for each member): ... Call DFSORT or ICETOOL to process each member by copying 1-72 and padded to right. Same input - same output. >> -- ALLOCATE the input dsn(member_nn)-- EXECIO to read the member into input >> stem.-- FREE the input dsn May work, but if the member is large, you may run out of storage. Alternatively, try this little loop: "EXECIO 1 DISKR IN" PULL LINE ... do your copy work ... PUSH OUTLINE "EXECIO 1 DISKW OUT" >Not the most efficient way, but if this is a one-time job, it probably doesn't >matter. Indeed. You can perhaps use Assembler and using standard macros to process the memberlist and call DFSORT/ICETOOL to do the copy, but ... Groete / Greetings Elardus Engelbrecht ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN