Hello, OK to ask for some help please, or where might I go?:-) Am not a sysprog, hope to be back on a z/OS machine in a short while, have to convert several ooREXX's to mainframe acceptability so, to save some mainframe time $'s, if I may, will ask neophyte questions (have googled); that said ..
.. this REXX CJM1 will run from TSO/ISPF Option 6 and is: /* REXX CJM1 */ CALL PARA1 CALL PARA2 CALL PARA3 EXIT /* this needs to delete an empty or non-empty PDS from existence, do I need to allocate etc, or will the following work? */ PARA1: F1 = '"ENCORE.CBL.SOURCE"' "DELETE "'F1'"" /* TRYING TO GET MY HEAD AROUND THESE QUOTE'Y THINGS */ RC_REASON = 'DELETE 'F1; CALL RETCODE RETURN /* this needs to 1. create a new PDS if it's not there 2. empty it if it is there */ PARA2: F2 = '"CONRAD.TEST.CPYBKS"' "ALLOC DA("'F2'") NEW REUSE RECFM(F B) LRECL(80)", "DIR(255) SPACE(50,10) TRACKS UNIT(SYSDA)" RC_REASON = 'ALLOC I 'F2; CALL RETCODE /* WISE TO FREE THIS FIRST?; IF ALLOC FAILS, CAN I ASSUME FILE NOT THERE */ RETURN /* this needs to read and print a PDS member; is there a 'not so crude' way */ PARA3: F3 = '"SUPPORT.FILE.PDS(FDQKVS)"' "ALLOC DDNAME(INFILE1) DSN("'F3'") SHR REUSE" RC_REASON = 'ALLOC I 'F3; CALL RETCODE /* WISE TO FREE THIS FIRST?; IF ALLOC FAILS, CAN I ASSUME FILE NOT THERE */ F3_EOF = 'NO' DO WHILE F3_EOF = 'NO' "EXECIO 1 DISKR INFILE1" IF RC = 0 THEN DO PULL WS_INB SAY SUBSTR(WS_INB,1,79) END ELSE DO F3_EOF = 'YES' END END "EXECIO 0 DISKR INFILE1 (FINIS" RC_REASON = 'FINIS 'F3; CALL RETCODE "FREE DDNAME(INFILE1)" RC_REASON = 'FREE 'F3; CALL RETCODE RETURN RETCODE: IF RC \= 0 THEN DO SAY 'E: 'RC_REASON' PROBLEM'; EXIT END ELSE DO SAY 'I: 'RC_REASON' OK' END RETURN .. thanks in advance, Graham Hobbs PS. Not being 'deep' .. why is I/O coding different between mainframe and ooREXX? Did it have to be? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN