Surprise! Out of our collective movie past, after a 20-year hiatus, James Cagney now arrives on television. ''James Cagney: That Yankee Doodle Dandy'' (PBS, Monday, 9-10:30 p.m., but check local listings because fund-raising week on most PBS stations results in individualized scheduling) is a delightful retrospective of Cagney's 62 feature films, produced-written-directed by Richard Schickel, who also produced the recent PBS series, ''The Men Who Made The Movies.''
First, let me warn viewers that this 90-minute program is, in effect, a shamelessly obvious promotion for Cagney's ''comeback'' movie ''Ragtime.'' Shot mostly on London locations and sets for ''Ragtime,'' with innumerable plugs for the recently released film, ''That Yankee Doodle Dandy'' tells the story in film clips and interviews of this man who has been charming and scaring film audiences for 50 years. Since the ''Ragtime'' film clips are fascinating in themselves, Mr. Schickel must be excused for allowing his viewers to be used so pleasantly.
Twenty years ago James Cagney retired to his cattle farm in upstate New York, only to be lured back last year to films by director Milos Forman of ''Ragtime.'' Now Cagney is planning a whole new career, with additional roles in the offing.
Mr. Schickel, a fan as well as a film critic and historian, has laced the retrospective with lengthy clips and solid interviews with Cagney himself, as well as such movie personages as Pat O'Brien and Donald O'Connor. Of course there are, as well, interviews with ''Ragtime'' participants such as Milos Forman and Norman Mailer.
Cagney reveals he was originally hired because the director felt he had a ''fresh mutt'' quality. According to Norman Mailer, Cagney taught us that ''tough guys can be decent - what we all wanted to hear.'' But Schickel insists that Cagney's gangsters combined toughness with tragedy , revealing ''the dark side of the American Dream.''
Practically all of the famous scenes American moviegoers remember so well are included in this retrospective - including the grapefruit in Mae Marsh's face and the ''Yankee Doodle Dandy'' dance numbers. What may come as a surprise to younger students of the Cagney legend is his performance in ''A Midsummer Night's Dream.''
Narrated by Treat Williams, ''That Yankee Doodle Dandy'' is an example of the ''compilation film'' at its best - plenty of footage of the man performing, fine interviews with those who knew him when, incisive conversation with the man himself, solid interpretive comments.
A chat with Richard Schickel
''My very first movie memory,'' says the producer-writer-director of ''That Yankee Doodle Dandy,'' was of being taken to see ''Yankee Doodle Dandy'' by my parents in 1942. I never forgot that marvelous dancing - Cagney bouncing off the proscenium arch. That movie has stayed with me through the years as nothing else has. That's why I had to do the Cagney retrospective.''
According to this Time magazine movie critic, Cagney possessed the gift of understated talent. ''But Cagney had something even more special - he was a feisty, New York scrapper - the movies' first hero with 'city smarts.' ''
What does Richard Schickel hope viewers will get from seeing his Cagney film?
''I hope they'll take away something very personal. It doesn't matter what it is as long as it is very personal - one hopes some new insight into the character of Cagney the man as well as Cagney the actor.''
What is it exactly that makes Cagney so great?
''He has a wonderful screen presence. And who knows where that comes from? If you'll notice in the TV show, I stay in close to him (with the camera) as often as possible. At first I was sure we were not getting anything except his impassive face . He is definitely 'a faraway fella,' as Pat O'Brien said.'' But then I looked at the film in the cutting room and that seemingly impassive face started sparkling incredibly. It is probably there all the time - but somehow it shows up fantastically on the screen.''