IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to recover source code which is overwritten by load mod?


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ravi1

New User


Joined: 27 Apr 2006
Posts: 11

PostPosted: Wed Sep 26, 2007 4:44 am
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Sep 26, 2007 4:57 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Sep 26, 2007 6:49 am
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Sep 26, 2007 8:01 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Sep 26, 2007 8:26 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Sep 26, 2007 1:27 pm
Reply with quote

Quote:
My friend .....

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Sep 26, 2007 4:00 pm
Reply with quote

If you still have in SDSF the last compilation listing, it could be possible to retrieve the code from there.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Sep 28, 2007 6:36 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Sep 28, 2007 10:22 pm
Reply with quote

if you are lucky enough to have xpeditor, you can always print the ddio source and recover from that.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Sep 29, 2007 12:33 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Sep 29, 2007 12:38 am
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Sep 29, 2007 12:43 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts Load new table with Old unload - DB2 DB2 6
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts How to load to DB2 with column level ... DB2 6
Search our Forums:

Back to Top