When Chaz Jankel walked into Ian Dury's dressing room in a pub in Shepherd's Bush one night in the mid-1970s, he wasn't exactly welcomed with open arms.

Almost 40 years on, however, the legacy of that first meeting between the two men who a couple of years later would take their jazz-funk music hall songs to the top of the charts with Ian Dury and the Blockheads is still going strong. It is that legacy that is celebrated in Reasons To Be Cheerful, Paul Sirett's play for disabled theatre company Graeae, which arrives in Dundee next week as part of a UK tour.

Set in 1979 not long after Margaret Thatcher's Conservative government has been elected, Reasons To Be Cheerful (not to be confused with Martin McArdie's play of the same name for 7:84 Scotland inspired by comedian Mark Steel's book) finds a gang of diehard Blockheads fans locked out of a sold-out gig at Hammersmith Odeon. Over the course of the night, however, things turn out somewhat differently. As indeed they did for Jankel all those years ago in Shepherd's Bush.

It had all started the day before, when Jankel had been purchasing a Wurlitzer keyboard at a local music emporium, where he left his telephone number in search of a gig. This was picked up by guitarist Ed Speight of the Dury fronted pre-cursor to the Blockheads, Kilburn and the High Roads. Speight contacted Jankel and invited him to watch the High Roads the following evening with a view to auditioning for the band. After the show, an impressed Jankel made his way towards the open door of what passed for a dressing room, where he was stared out by the band's somewhat defensive vocalist.

"'Ere, mate, do I know you?" said Dury, without waiting for an answer. "Well, **** off, then."

Jankel backed off, but was invited to a rehearsal by Speight the next day anyway, whereupon he got the gig. "Ian was a bit wary, because he was king of the pub circuit, but it was as big as things were going to get, and it wasn't going anywhere beyond, but we stayed together for nine months."

After that band split in 1975 ,and, despite such inauspicious beginnings, Jankel started writing with Dury, and within a few months of the Blockheads being born, both debut single Sex & Drugs & Rock & Roll (founded on a Charlie Haden bassline from jazz saxophonist Ornette Coleman's Change of the Century album), and its follow-up, Sweet Gene Vincent, were in the bag. Part of the appeal of a sound that eventually produced the saucily-titled New Boots and Panties album was the glorious counterpoint between the band's sophisticated musical backing and Dury's cockney geezerish demeanour.

"Ian was labelled the godfather of punk," remembers Jankel, from his home studio where he's writing and rehearsing new Blockheads material with Derek Hussey, who has sung with the band since Dury's death in 2000. "His lyrics were anarchic, and I think he was the first person to hang a razor blade from his ear, but musically we were way ahead. Punk had no light and shade, which was fine for a while, but Ian loved subtlety in music, whether it was jazz, blues, country, all of it. His lyrics were just so incisive and colourful, and he wrote a lot about people who didn't get on the balance sheet, as it were. Ian felt quite disenfranchised, because of growing up in this institution with autistic and disabled kids where they were all thrown in together. But he was very intelligent. There are so many people out there who think they write good lyrics, but they just don't address the people who are on the edges of society. Ian had an empathy with these people, who are where they are not because it's their fault, but through circumstance, and he did it with humour."

These songs and more are played live in Reasons To Be Cheerful, which is the latest treatment of Dury's back catalogue following another stage musical, Hit Me! The Life and Rhymes of Ian Dury, in 2009, and the big-screen biopic, Sex & Drugs & Rock & Roll the same year. In truth, though, Reasons To Be Cheerful sounds more akin to the wave of fan-based musical plays kick-started by Edinburgh hit, Meeting Joe Strummer. Either way, Jankel, who isn't directly involved in the show, maintains he hasn't seen anything like it.

"It's probably the most special theatrical performance I've ever seen," Jankel enthuses. "It's got attack, and it's got humour, and Jenny (Sealey) the director is deaf, so it's a remarkable feat in itself that she's directing a musical, literally getting into the vibrations of it all. I was talking to her the other day, and she's a punk at heart. She's really anarchic, and is cut from the same emotional cloth as Ian was. That's why she gets him.

"The play also captures a time that's very similar to now, but when you're in the middle of it you can't really see that. There was a Conservative government and mass unemployment then, and that's what you've got now as well. The only difference I can see is that then there were a lot more platforms for discontent. Now, it's more diffuse. Back then you had the eccentric old pub acts telling it like it was. That's where Ian came from. But now, it just seems like we're not very good at revolutions. The French are a lot better at it, but it's never been the British way. The songs we were writing then were full of discontent and contempt, and that comes through in the show."

In some respects, Dury was the perfect pin-up boy for the disabled lobby. Having been struck down with polio aged seven, he spent some time in the school for disabled children mentioned by Jankel before studying at Walthamstow Art College, where he was taught by pop artist Peter Blake. Dury walked with a stick, and even worked it into his stage act as the likely inspiration for the Blockheads 1978 number one, Hit Me With Your Rhythm Stick. 1980's I Wanna Be Straight played with the yearning to be able to stand upright and the following year's Spasticus (Autisticus) was a provocative howl of defiance which was banned by the BBC.

"Ian never really identified with being disabled," Jankel admits, "even though he knew people could see that he was. He never really identified with just one group in that way, but I think he'd admire the spirit of Graeae. Ian was clever, and when he got ill with cancer, he became very humble. All those rough edges he had rubbed off, and he became a much more sympathetic person. The anger had been tamed out of him towards the end. Ian loved writing lyrics, and even when he got tired playing live, he loved the après-show, back at the hotel with a couple of pints of Guinness. He was the gang boss, and we were the gang."

Reasons To Be Cheerful, Dundee Rep, March 20-24 www.dundeerep.co.uk www.graeae.org