Page 1 of 1

want to determine if hex date field populated

PostPosted: Sat Jun 29, 2013 12:25 am
by sydtally
Hi,
I am wanting to output a third data set from my input file that has a date (hex)4 bytes starting in pos 91 ... I only want to include the record if it has a date ... it is not 00000f
//SORTOUT3 DD DSN=D.WIT.WRK.WCRF01.EFTPCHKC,DISP=(NEW,CATLG), 
//            DCB=(RECFM=FB,LRECL=0)                           
//SYSPRINT DD SYSOUT=A                                         
//SYSOUT   DD SYSOUT=A                                         
//CTL1CNTL DD *                                               
      SORT FIELDS=(1,103,CH,A)                                 
      OUTFIL FNAMES=SORTOUT1,                                 
      INCLUDE=(59,1,CH,NE,C' ')                               
      OUTREC FIELDS=(1,103,C'V')                               
      OUTFIL FNAMES=SORTOUT2,                                 
      INCLUDE=(43,1,CH,NE,C' ')                               
      OUTREC FIELDS=(1,103,C'R')                               
      OUTFIL FNAMES=SORTOUT3,                                 
      INCLUDE=(93,4,??,NE,??)                                 
   OUTREC FIELDS=(1,103,C'C')                               
      END                                           
anyhelp would be appreciated.
thanks

Re: want to determine if hex date field populated

PostPosted: Sat Jun 29, 2013 3:06 am
by BillyBoyo
CH and X'00000F' - that's three bytes. If it is four long, X'0000000F'.

Re: want to determine if hex date field populated

PostPosted: Mon Jul 01, 2013 7:21 pm
by sydtally
Thank you! yes it was my typo it is 4 long.

Re: want to determine if hex date field populated

PostPosted: Mon Jul 01, 2013 7:51 pm
by Akatsukami
Although I cannot say definitely without more information, this alleged date field sounds very much like an unsigned packed decimal of precision 7. I really think that we need to know more about the data.