incomplete extracts from exec I use to process PDS' but just to supply some 
actual rexx code to go with the psycho code: 

pds = "'fully.qualified.dsn'"
x = OUTTRAP("amems.",9999,'NOCONCAT')
  cmd = "LISTD "pds" MEMBERS"
  cmd
x = OUTTRAP('OFF')

sellist = ' '
DO i = 7 to amems.0
  member = SPACE(amems.i,0)
   sellist = sellist member
END
reccnt = WORDS(sellist)

DO i = 1 TO reccnt
  mem    = WORD(sellist,i)
  CALL Stuff
END

Stuff:

  dsn = SPACE(TRANSLATE(pds,'',"'"),0)
  mem = "'"dsn"("mem")'"
  DROP mrec.
  "ALLOC FI(Alocmem1) SHR       DA("mem") "
  'EXECIO * DISKR Alocmem1 ( STEM mrec. FINIS'
  "FREE  FI(Alocmem1) "
  DO         j = 1 TO mrec.0
/*
 *  set orec.j to mrec.j
 *  when j = memrec.0 then add your extra lines; increment j + 1, set stemvar
*/  
  END
/*  allocate output dsn/mem */
  'EXECIO * DISKW Tempout1 ( STEM orec. FINIS'



      

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to