The SORTs (Sync or DF) will happily allow SORTIN/SORTOUT to be the same file. And in today's world of lot'o'region and space this is probably safer than it used to be.
They didn't fire me when in the first few weeks (many moons ago) on the job I used this trick on the payroll master tape. Ran just fine until the need to allocate buffers for the output phase died for lack of region. I don't know how the more senior programmer recovered the data, but it took him some hours. > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[email protected]] > On Behalf Of Paul Gilmartin > Sent: Friday, March 21, 2014 1:53 PM > To: [email protected] > Subject: Reflexivity (was: NJE Clarifications) > > On Fri, 21 Mar 2014 09:21:57 -0700, Skip Robinson wrote: > > ... > >'NJE with oneself' has no meaning. ... > > > There's a peculiar tendency of designers and testers to ignore, even shun, > that > reflexive boundary condition. > > o NJE can't communicate with the local host. > o iconv used to reject input character set and output > character set the same (it's better now). > > TCP/IP, in contrast, is blessedly tolerant. It even has a pseudo-hostname, > "localhost", for the purpose. > > "Why would anyone want to do that?" Suppose I have a filter that tailors > some JCL and submits it to a remote host. Suddenly I want to employ the > filter but run the job locally. Unless the design was sufficiently modular, I > must modify the utility to detect and treat specially the local host case. > > I might want to use iconv to test a file against a character set for validity > by > translating it to the same character set. > > I might want to test a design without using a remote host. > > (One might be prudent to prohibit using a filter where the input and output > files are the same. That can cause data corruption. > But CMS COPYFILE operating on MDFS files always creates a temporary file > and renames it at the end. This avoids corruption in the routine case, and > somewhat protects against data loss even if the system crashes.) > > The OP thought he had a valid motivation. > > -- gil > > ---------------------------------------------------------------------- > 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
