Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
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    Post subject: How to recover source code which is overwritten by load mod?
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: 3158
Location: Tucson AZ

PostPosted: Wed Sep 26, 2007 4:57 am    Post subject: Re: How to recover source code which is overwritten by load
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

Site Director


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

PostPosted: Wed Sep 26, 2007 6:49 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Sep 26, 2007 8:26 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Sep 26, 2007 1:27 pm    Post subject: Reply to: How to recover source code which is overwritten by
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: 1228
Location: Israel

PostPosted: Wed Sep 26, 2007 4:00 pm    Post subject:
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    Post subject:
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: 6967
Location: porcelain throne

PostPosted: Fri Sep 28, 2007 10:22 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Sat Sep 29, 2007 12:33 am    Post subject: Reply to: How to recover source code which is overwritten by
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

Site Director


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

PostPosted: Sat Sep 29, 2007 12:38 am    Post subject: Reply to: How to recover source code which is overwritten by
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: 2150
Location: At my coffee table

PostPosted: Sat Sep 29, 2007 12:43 am    Post subject: Re: Reply to: How to recover source code which is overwritte
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    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us