How to takes missing files

Hi Am using unix aix

I have a group of files in File1
For ex:-

Vi file1
A0405
A0605
A0805

When i tried using awk command am getting an error as No space

a=`awk 'NF < 1 {next;} p && p != $1 { for( i = p; i < $1; i++ )print i; } {p = $1 + 1 }' file2`

Error message:-

+ + awk NF < 1 {next;} p && p != $1 { for( i = p; i < $1; i++ )print i;}{p = $1 
+ 1 } file2
aa04[3]: no space

outputs must be:
Missing:-

A0505
A0705

can anyone help me..........
[/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT]

what you are trying to do please explain

Hi raj_saini20

In file1 i have a lots of files starting with alphabet A....
For ex A0405 (04 is date and 05 is month )
when i give inputs to awk command i need the outputs what are the files missing k
if i used this awk command to only having number inside the file1 ..
for ex

vi file1
     01
     04

am getting the output

 02
 03

But when i have the files like A0405 etc...
Am getting error message as mentioned above...
In the above ex i have mentioned three filename in files1 file
wants the results as

A0505
A0705

try this

awk 'NF < 1 {next;} p && p != $1 { for( i = p; i < substr($1,2,2)+0; i++ )printf "A%.2d",i;print x } {p = substr($1,2,2) + 1;x=substr($1,4,2) }' file1

Thanks raj..
But i tried didnt get the results ..
i got output only
-------
R0
-------
My files will be in format AssR0405

but i checked on HP-UX its working with output

A0505
A0705

for your sample file1

AM using AIX.
Am getting the output as
---------
R0
--------

---------- Post updated at 04:10 AM ---------- Previous update was at 02:29 AM ----------

HI all,
When i tried using this command..
a=`awk 'NF < 1 {next;} p && p != $1 { for( i = p; i < substr($1,5,2)+0; i++ )pri
ntf "A%.2d",i;print x } {p = substr($1,5,2) + 1;x=substr($1,4,2) }' file2`
echo "The missing files are $a "

i got as output:
-------------------------------
The missing files are A03R0
A05A06A07A08A09A10A11A12A13A14A15A16A17A18A19A20A21A22A23A24A25A26A27R0
-------------------
But i wants the output like this ..
------------------
AssR0308
AssR0508
....
...
AssR2708
-----------

vi file2
AssR0208
AssR0408
AssR2808

try this

awk 'NF < 1 {next;} p && p != $1 { for( i = p; i < substr($1,5,2)+0; i++ ){printf "AssR%.2d",i;print x }}
{p = substr($1,5,2) + 1;x=substr($1,7,2) }' file2