4060 BAT by Schadenfreude

This was a very difficult puzzle from Schadenfreude. A code in which 20 letters of the alphabet (excluding G, J, K, Q, Y and Z) are encoded to a permutation of the same 20 letters had to be decoded. This gave A=I, B=P, C=X, D=H, E= O, F=B, H=D, I=W, L=M, M=C, N=R, O=A, P=L, R=T, S=E, T=N, U=F, V=S, W=U and X=V. When the top and bottom rows were decoded they read PERSONAL IDENTIFICATION NUMBER. With this entered in the grid all of the down entries were still words. When the initial letters of extra words in clues were decoded they instructed the solver to ENTER DECODED ROW FOUR AS NUMERALS IN VACANT CELLS. Row four decoded as TWO ONE SIX THREE.    The title was a coded version of PIN.

Extra words in clues are shown in [ ]

Across
11 Retired doctor in alliance [sacrificing] principles (6)
AXIOMS MO reversed in AXIS
12 A variable force corrupted all [the] video (8, two words)
LIVE LOAD Anagram AL VIDEO
13 Sailor's [rowing] back to strengthen part of the rigging (7)
RATLINE TAR reversed + LINE (to strengthen)
15 Couple stopped by rule that is plain [stupid] (7)
PRAIRIE R (rule) in PAIR + IE
19 Pundit writing on [Northern] European sport (7)
ERUDITE  E + RU (rugby union) + DITE (writing)
21 Females [hanging] about in the centre of Adelaide? (7)
SHEILAS SHES containing I (in) + LA (central letters of Adelaide)
24 Metal worker [starts] to use old gold (6)
WELDOR WELD + OR
25 Head? Not in [my] old ale (4)
NOGG NOGGIN less IN
26 [Equations] reveal the bottom low number (4)
MOON MOO (low) + N (number)
27 American tree [hoppers] refuse to start to develop (6)
REDBUD RED (refuse) + BUD
30 Ways to strengthen lovelorn [sex] experts? (7)
MANNERS MAN (to strengthen) ONERS less O (lovelorn!)
32 Chief officer to decline a novel [handout] (7, two words)
AGA SAGA AGA (chief officer) + SAG (decline) + A
38 I see [nomads] crossing desert with fury (7)
IRATELY RAT (to desert) in I + ELY (see)
39 Make [equipment] available on hire (7)
RELEASE RE (on) + LEASE
40 Liberal to be thrown out of very angry committee? That [indignity] can be avoided (8)
EVITABLE EVIL (very angry) less L + TABLE
41 Inferior channel for the [urbane] audience (6)
COARSE Homophone COURSE
 
Down
1 [Extended] tube rail length (6)
BARREL BARRE + L
2 Respectable [woman] needs time for cold dark hours (4)
NITE NICE changing C (cold) to T (time)
3 East in very familiar no-trumps took all the tricks (5)
VOLED V (very) OLD containing E
4 One [officer] formally raised the other issue (4)
EMIT ME (see ONE in Chambers) reversed + IT
5 Examination over embankment cut short by railroad [VIP] (6, two words)
O LEVEL O (over) + LEVE(e) + L (elevated railroad)
6 Amateur in [troupe] plucks instruments like a lute (5)
PIPAS A 9amateur) in PIPS
7 She's keeping a [website] about The Listener (6)
HEARER A + RE in HER
8 [Lawyers] lie about the beginning of large slippage (7)
SLIDING L in SIDING
9 [Steep] rent for American nurse (4)
TORN TO (for) + RN (Registered Nurse)
10 In part a [novel] describes hell for a poet (4)
ADES Hidden
14 Direction of [operational] broadcast between fighters? (8)
AIR-TO-AIR AIRT + O (of) + AIR (broadcast)
16 One's eagerly excited before Earl's [personal] introductions (8)
ISAGOGES I’S + AGOG + E (earl)’S
17 Guides spread [vaguely] from one section to another (6)
STEERS TEER in S + S (sections)
18 A surly fellow some say [attracts] a bird (6)
CHOUGH Homophone CHUFF
20 Finally you put [thyme] on thick pasta (4)
UDON (yo)U + DON
22 Renovated old [xenon] lamp missing power flap (4)
LOMA Anagram O + LAMP less P (power)
23 A tan, not patchy [ochre] colouring (7)
ANNATTO Anagram A TAN NOT
27 Man in hold up to try [moving] again (6)
REHEAR HE in REAR
28 A cap spoilt brat [often] keeps on (6)
BARRET RE (on) in Anagram BRAT
29 Tilt yard enclosed by about ninety [trees] (6)
CAREEN CA (about) + REE + N (ninety)
31 Inflamed swelling restricting left hand [rotation] (5)
STYLE L (left) in STYE
33 Is duck [mould] a bargain? (5)
STEAL ‘S + TEAL
34 [Strikers] lean on United substitute (4)
LIEU LIE + U
35 Morag's cooking fat fish in special medium, [possibly] ... (4)
SAIM AI in S + M (Morag is a hint to a Scots word)
36 ... her aromatic spice [pleasing] Charlie to a small degree (4)
CLOW C + LOW
37 Fish [vitalises] female cat (4)
BARF BAR + F