enrico-sorichetti's method will often work, but ...
Many sites have programs than can "undelete" members. These programs cannot recover member names; the names they assign seem random. For example -
Name Prompt Size Created Changed ID
. $$000004
. JOB01 25 2010/12/24 2010/12/24 09:51:17 XXXXXX
In this case, member $$000004 has been recovered, but its ISPF attributes have disappeared. However, you can browse or edit the member, and use its contents to recover the member name.
Load modules are more difficult.
Name Prompt Alias-of Size TTR AC AM RM
. $$004624
. $DYNPGM 000002E8 000107 00 31 ANY
You can browse the member, but it may not be very helpful.
.Ø..... ALLOCVOL.......qMAINPCL ...q...HVOLPCL ...-....AVMSGS ...°....
س..............................................................................
Ø..5695PMB01 ....¤..°±
Ø.d......Ø..569623400 ....¤
............ ..y...q...H........
å00..ALLOCVOL-12/05/10=12.59°Ö}..õ..qÑ..xì....ì0E\...Ì. .£...+ 0¬.&}0.&0}..ÿ&-¬.
.......................Ã...¯...ö...ü...............4.......U.......Ö
You can relink the member, but you have to examine the relinked member carefully to verify it's been linked correctly.
//A EXEC PGM=IEWL,PARM='MAP,LIST'
//SYSPRINT DD SYSOUT=*
//INPUT DD DISP=(SHR,PASS),DSN=&SYSUID..UNDELETE.DS3
//SYSLMOD DD DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,(1,1,1))
//SYSLIN DD *
INCLUDE INPUT($$004624)
NAME X
(There should be a blank before the INCLUDE and NAME statements, but the board deleted it.)
The entry point may be incorrect. Sometimes it cannot be recovered! Other load module attributes are lost. The Binder will write other error messages.
IEW2322I 1220 1 INCLUDE INPUT($$004624)
IEW2515W 4731 DIRECTORY ENTRY FOR MEMBER $$004624 IDENTIFIED BY DDNAME INPUT IS NOT MARKED AS LOAD MODULE.
IEW2322I 1220 2 NAME X
IEW2650I 5102 MODULE ENTRY NOT PROVIDED. ENTRY DEFAULTS TO SECTION ALLOCVOL.