Jeffrey Deaver wrote on 12/21/2006 08:16:15 AM:
> I have two files in the same format...
>
> ADC.DPGMDEV.TWORK.HDBSPB.IT010              2006-08-31...Â.
> CCC4CDCDCCE4EEDDD4CCCEDC4CEFFF44444444444444FFFF6FF6FF00160
> 143B4774455B36692B842272B930100000000000000020060080310072C
>
> ...  That's the text with the hex turned on below it.
>
> Both files contain fields 1)filename 2)date, and 3)positive packed
decimal
> number.   I need to subtract file 2 from file 1 where the file names are
> the same, but I need the currently positive numbers in file2 to be
> >subtracted< from file1.   If the numbers in file 2 were negative, it
would
> be an easy sort, but I'm brain freezing on how to turn them negative
first.

You can turn the positive values negative by multiplying them by -1 with
these DFSORT control statements:

  OPTION COPY
  INREC OVERLAY=(55:55,5,PD,MUL,-1,TO=PD,LENGTH=5)

Note that this will handle any positive sign used for PD (A, C, E, F).

Frank Yaeger - DFSORT Team (IBM) - [EMAIL PROTECTED]
Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, Symbols, Migration

 => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to