cbhargavi ,
Assuming you want date in position 30 in a RECFM=FB and LRECL=80 byte , use the following DFSORT JCL. If your input is VB we may need to do it differently.
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
----+----1----+----2----+----3----+----4----+----5----+----6----+
WANT YYMM IN POSITION 30
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFOUTLEN=80,
IFTHEN=(WHEN=INIT,OVERLAY=(81:DATE2,30:83,4))
//*
The output of the above job is
----+----1----+----2----+----3----+
WANT YYMM IN POSITION 30 1302