View previous topic :: View next topic
|
Author |
Message |
ravi1
New User
Joined: 27 Apr 2006 Posts: 11
|
|
|
|
Hi Friends,
My friend used the same pds for load module and source code. The source code was overwritten.
Can any body tell how to recover source code?
Note: No version control tools were used. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
ravi1 wrote: |
My friend used the same pds for load module and source code. The source code was overwritten. |
If the same member name was overwritten, no, it is gone...
If the member nme was not steped on, and only the PDS recfm and lrecl was changed, then yes... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
How long had the source code been in the pds?
If there is a backup somewhere (like full volume duisaster backups), the module may be recoverable. I'd suggest talking with the storage management people.
If a load module was written over the source pds, the pds is damaged and will need to be fixed.
Following is one of my favorite rants. . . .
Only standard complie/link jcl should be used. I'll wager that the standard jcl writes load modules to the proper library. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
dick scherrer wrote: |
Hello,
How long had the source code been in the pds?
If there is a backup somewhere (like full volume duisaster backups), the module may be recoverable. I'd suggest talking with the storage management people.
If a load module was written over the source pds, the pds is damaged and will need to be fixed.
Following is one of my favorite rants. . . .
Only standard complie/link jcl should be used. I'll wager that the standard jcl writes load modules to the proper library. |
And the people who are least skilled at JCL are the ones that want to use their own. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Yup, seems to be happening more and more.
I'm struggling trying to picture what kind of management can even tolerate it.
Most of the places i've supported make it a conditoin of continued employment that the developers use the standard procedures and libraries. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Just picking!
why Your friend does not post himself ???
anyway
if the dsorg is PDS - NOT PDSE - and the dcb it' s still fb 80
then there are a few tools around which might help to resurrect
dead spots of a pds
( I do not know exactly - never used it , but fileaid might have such a feature )
regards
e.s |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
If you still have in SDSF the last compilation listing, it could be possible to retrieve the code from there. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Ravi1,
If the source lib has been "destroyed" you may be able to use this to recover it. The pgm you attempted to compile may "come back" too, then again maybe not.
But as Marso pointed out you can edit the compile sysout listing and recover the code.
Code: |
***********************************************************************
JCL to recover source lib changed to load lib
***********************************************************************
//FIXRECFM JOB (ACCT),CLASS=A,...
//*
//JS010 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD *
FIX THIS PDS
//SYSUT2 DD DSN=your.broken.sourcelib(@@FIX),DISP=SHR,DCB=RECFM=FB
After the program/JOB is run, the PDS should have its record format set back to FB.
You can then delete the object program from the source library using ISPF 3.1 or other
means (if you tried to access the program you would now get an I/O error since the RECFM
is no longer set to U). You can also delete the @@FIX member since it isn't needed. |
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if you are lucky enough to have xpeditor, you can always print the ddio source and recover from that. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Out of curiosity, how is this possible to do? I tried to intentionally create this event today, and I always get the error message stating:
THE LINKAGE EDITOR CANNOT BE USED TO UPDATE A LIBRARY WITH FIXED OR VARIABLE RECFM
ending with RC=12 on the LINKEDIT step. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Kevin,
When you tried this, did you specify recfm=u in your compile jcl?
I've not tried it, but was just wondering. . . Maybe i can see what happens trying it here over the weekend.
d |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
superk wrote: |
Out of curiosity, how is this possible to do? |
I don't know, but it happened to me once....
And something along the lines of Jack's fix made it all better....
Can't remember if it was the linker (before the newer binder) or just a move.... Once learned, twice careful.... |
|
Back to top |
|
|
|