Can anyone help me in converting a date field YYYYMMDD to a s9(7) Comp-3.
Input file:
AB80¦105¦000056-1¦1¦C102¦EA¦11021¦20110125¦
FG80¦105¦000056-1¦1¦C102¦EA¦11031¦20110125¦
AB80¦105¦000056-1¦1¦C102¦EA¦11021¦20110125¦
FG80¦105¦000056-1¦1¦C102¦EA¦11031¦20110125¦
The required output for the Column 7 and 8 should be of comp-3 value and its a date field
The output Column data should be with this defenition
Field Name Attribute Date Format
----------- ---------- ------------
Col7 03 JUL-DT PIC S9(5) COMP-3. julian YYDDD
Col8 03 TRXN-DT PIC S9(7) COMP-3. MMDDYY
//STEP010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=A.B.C,DISP=SHR
//SORTOUT DD DSN=A.B.D,
// UNIT=DISK,SPACE=(TRK,(1,2),RLSE),
// DCB=(LRECL=35,BLKSIZE=0,RECFM=FB),
// DISP=(NEW,CATLG,DELETE)
//SYSSORT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//SYSIN DD *
SORT FIELDS=COPY
INREC PARSE=(%00=(ENDBEFR=X'6A',FIXLEN=05),
%01=(ENDBEFR=X'6A',FIXLEN=03),
%02=(ENDBEFR=X'6A',FIXLEN=06),
%03=(ENDBEFR=X'6A',FIXLEN=01),
%04=(ENDBEFR=X'6A',FIXLEN=05),
%05=(ENDBEFR=X'6A',FIXLEN=02),
%06=(ENDBEFR=X'6A',FIXLEN=05),
%07=(ENDBEFR=X'6A',FIXLEN=08)),
BUILD=(%00,%01,%02,%03,%04,%05, X
%06,UFF,PD,LENGTH=3, X
%07,UFF,PD,LENGTH=4)
/*
//
with the above JCL the column 8 i get different output when the data is loaded into the table
Input output
20110125 11/1/2025
can any one help me in this regard.
Thanks
JRS