nikesh_rai,
You have to convert dd.mm.yyyy to mmddyyyy before you can convert it to Julian. You can use a DFSORT job like the following. I assumed your input file has RECFM=FB and LRECL=80, but you can change the job appropriately for other attributes:
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
AAAAAAAAAAAA31.12.2011BBBBBBBBBBBB
AAAAAAAAAAAA17.10.2011BBBBBBBBBBBB
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFOUTLEN=80,
IFTHEN=(WHEN=INIT,OVERLAY=(81:16,2,13,2,19,4,
13:81,8,Y4W,TOJUL=Y4T,3X))
SORTOUT would have:
AAAAAAAAAAAA2011365 BBBBBBBBBBBB
AAAAAAAAAAAA2011290 BBBBBBBBBBBB