In the "bad old days" this was called a Suicide Sort. Sadly, it was often necessitated by lack of disk space, or horror of horrors, lack of scratch tapes. I remember a time, with a spendthrift company, that I routinely re-initialized old version vendor installation tapes to use for output. CA was a generous provider.




On 3/21/2014 4:12 PM, Sri h Kolusu wrote:
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

Dave,

For DFSORT, your statement is true only if you are SORTING the data as for
a copy application, the SORTIN data set should NOT be the same as the
SORTOUT data set or any OUTFIL data set because this can cause lost or
incorrect data or unpredictable results.


Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List <[email protected]> wrote on
03/21/2014 01:58:33 PM:

From: "Gibney, Dave" <[email protected]>
To: [email protected],
Date: 03/21/2014 01:58 PM
Subject: Re: Reflexivity (was: NJE Clarifications)
Sent by: IBM Mainframe Discussion List <[email protected]>

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
----------------------------------------------------------------------
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

Reply via email to