I am getting most of this information here: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxa500/tso.htm
On Tue, May 28, 2019 at 1:55 PM Billy Ashton <[email protected]> wrote: > Hi John, yes (sorry), I should have mentioned this is in a shell script. A > couple more questions, if you don't mind: > 1. Can I force the RC to become zero if the delete fails (there is an > occasion where the process runs to create the file new the first time in > the month)? > 2. Can I specify SMS parameters (data class, storage class) on that > allocate when I run in batch JCL mode? > > Thanks! > B > > On Tue, May 28, 2019 at 2:46 PM John McKown <[email protected]> > wrote: > > > On Tue, May 28, 2019 at 12:44 PM Billy Ashton <[email protected]> > > wrote: > > > > > Does anyone have a sample of Bpxbatch commands to delete a z/OS flat > > file, > > > and then to allocate it anew? I am trying to work out some processing, > > and > > > this would be in the middle of a set of commands. I would hate to break > > > this up into three job steps, just to insert the delete/allocate in the > > > middle (I am using the file earlier in the script). > > > > > > > If I am understanding you, you basically want a way to delete & allocate > a > > z/OS "flat file" (physical sequential) in a /bin/sh shell script. I am > > assuming you want a "regular" script, and not a REXX script. I did this > on > > a UNIX shell prompt, via ssh. > > > > $ file /bin/tso > > /bin/tso: z/OS Unix executable (amode=31) > > $ tso "del 'junk'" > > del 'junk' > > IDC3012I ENTRY JUNK NOT FOUND+ > > IDC3009I ** VSAM CATALOG RETURN CODE IS 8 - REASON CODE IS IGG0CLEG-42 > > IDC0551I ** ENTRY JUNK NOT DELETED > > IDC0014I LASTCC=8 > > RC(8) > > $ tso 'alloc ddn(x) dsn(junk.junk) lrecl(80) blksize(0) space(10,2) cyl > > recfm(f b) new catalog' > > alloc ddn(x) dsn(junk.junk) lrecl(80) blksize(0) space(10,2) cyl recfm(f > > b) new catalog > > $ tso 'del junk.junk' > > del junk.junk > > IDC0550I ENTRY (A) TSH009.JUNK.JUNK DELETED > > > > > > > > > > Thank you all! > > > Billy > > > > > > ---------------------------------------------------------------------- > > > For IBM-MAIN subscribe / signoff / archive access instructions, > > > send email to [email protected] with the message: INFO IBM-MAIN > > > > > > > > > -- > > This is clearly another case of too many mad scientists, and not enough > > hunchbacks. > > > > > > Maranatha! <>< > > John McKown > > > > ---------------------------------------------------------------------- > > For IBM-MAIN subscribe / signoff / archive access instructions, > > send email to [email protected] with the message: INFO IBM-MAIN > > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- This is clearly another case of too many mad scientists, and not enough hunchbacks. Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
