Skip to main content

I tried to add number of days to date using sort JCL. But getting below error every time I try date operations this way.

SORT106E: ***************************                                                                                                
          Field formats improperly specified

Here the sample that I tried.

//STEP0100 EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
20221003
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,8,CH,A)
OUTREC FIELDS=(1,8,9,8,Y4T,ADDDAYS,+5,TOJUL=Y4T)
//*


#mfjsort
#SYNCSORT
#dfsort
#EnterpriseServer
#dateoperation

I tried to add number of days to date using sort JCL. But getting below error every time I try date operations this way.

SORT106E: ***************************                                                                                                
          Field formats improperly specified

Here the sample that I tried.

//STEP0100 EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
20221003
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,8,CH,A)
OUTREC FIELDS=(1,8,9,8,Y4T,ADDDAYS,+5,TOJUL=Y4T)
//*


#mfjsort
#SYNCSORT
#dfsort
#EnterpriseServer
#dateoperation

Hi Manigandhan,

For SORT106E See documentation URL:
https://www.microfocus.com/documentation/enterprise-developer/ed70/ED-VS2017/HRFLRHSORT0S.html
This page advises that you specified an invalid data type in the FIELDS instruction. Can you review the fields and confirm you have specified those correctly.
Does this same JCL/SORT work on IBM Mainframe?