View previous topic :: View next topic |
Author |
Message |
Sysaron Beginner
Joined: 22 Feb 2004 Posts: 3 Topics: 3 Location: Los Angeles
|
Posted: Sun Feb 22, 2004 6:42 pm Post subject: Adding to a file if the DISP=OLD? |
|
|
Could you add more data sequencially if the file disp=OLD, of does it have to be disp=MOD? Will the previous data be overwritten if file is disp=old? |
|
Back to top |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Sun Feb 22, 2004 10:43 pm Post subject: |
|
|
Hi,
To add data recs to a PS file use MOD. If you use OLD and write to the file, the existing data will be overwritten. Also, the data not overwritten is no longer available unless extraordinary methods are used to recover it.
HTH, Jack. |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Mon Feb 23, 2004 2:56 pm Post subject: |
|
|
Err, Jack...
Don't you mean,
Quote: | Also, the data that is overwritten is no longer available unless extraordinary methods are used to recover it. |
rather than,
Quote: | Also, the data not overwritten is no longer available unless extraordinary methods are used to recover it. | ?
Also, you suggest a faint glimmer of hope when you say extraordinary methods can be employed to recover lost data. I always thought that, data once overwritten with DISP=OLD is gone...forever.  _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
Maton_Man Beginner

Joined: 30 Jan 2004 Posts: 123 Topics: 0
|
Posted: Mon Feb 23, 2004 6:40 pm Post subject: |
|
|
Not true Cogito-Ergo-Sum.
One example - If the dataset you were writing to was a member of a PDS then it would be rewritten at the end of the PDS and the previous space taken up by the member would be marked as inaccessible until a compress was done. This data could be accessed by means of stealth! _________________ My opinions are exactly that. |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
|
Back to top |
|
 |
Maton_Man Beginner

Joined: 30 Jan 2004 Posts: 123 Topics: 0
|
Posted: Mon Feb 23, 2004 11:39 pm Post subject: |
|
|
You've lost me Superk?! When did COBOL come into the equation? _________________ My opinions are exactly that. |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Tue Feb 24, 2004 12:13 am Post subject: |
|
|
Since JCL cannot by itself accomplish anything with data, other than to allocate the appropriate dataset using the specified disposition, then some sort of program must be invoked to accomplish the creation and/or addition of data to the dataset. Since no reference was made to any particular program requirements, I presume that any type of program is open for discussion within the context of this subject. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Feb 24, 2004 12:45 am Post subject: |
|
|
Quote: |
Don't you mean,
Quote:
Also, the data that is overwritten is no longer available unless extraordinary methods are used to recover it.
|
The original statement (data that is not overwritten) is fine. There is the PDS case, though one should not open a PDS with DISP=MOD, but there is also data remaining on the disk if less data is written than existed before. The old data still follows the EOF mark. That was the problem in the old days when no EOF mark was written by dynamic allocation, so you could read residual data ... big security problem. |
|
Back to top |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Tue Apr 20, 2004 10:01 am Post subject: |
|
|
Superk is correct. Using the appropriate OPEN in most languages will allow extension of a PS file. But you usually don't have that capability when using utilities. You're stuck w/OLD or MOD, so be careful, you can overwrite the existing data.
And CES, I did mean "not overwritten". You could probably use DITTO or some other sysprog magic, provided the data beyond the file mark was not reallocated and overwritten by another task.
Regards, Jack. |
|
Back to top |
|
 |
|
|