Conditional change a positive number to negative



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Conditional change a positive number to negative

Postby John A » Mon May 03, 2010 7:45 pm

I have tried various ways to change a positive packed decimal field to negative - tried several ideas from various posts.

Here is my latest sort JCL & control cards.

//FMTCFO   EXEC PGM=ICETOOL                             
//TOOLIN   DD  *                                       
  COPY FROM(INPUT)  TO(OUTPUT)  USING(CTL1)             
/*                                                     
//*                     FROM - LENGTH                   
//CTL1CNTL  DD  *                                       
      OUTFIL FNAMES=OUTPUT                             
      INREC  IFTHEN=(WHEN=(14,1,CH,EQ,C'R'),           
          OVERLAY=(4:4,4,ZD,MUL,-1,TO=ZDC,LENGTH=4))   
/*                                                     
//**                                                   
//INPUT    DD  DISP=SHR,                               
//             DSN=T#JWA.TEMP.PACKED.DATA               
//OUTPUT   DD  DSN=T#JWA.TEMP.RECORD.SIZE,             
//             DISP=(,CATLG,DELETE),                   
//             UNIT=SYSDA,SPACE=(TRK,(15,15),RLSE),     
//             DCB=(RECFM=FB,LRECL=020,BLKSIZE=0)       

Below is my input file:

..1........  R     
00F0111022244D444444
001011C022D009000000


Result is an ABEND:

09.54.01 JOB28504 +IDI0002I Module ICEOUTF offset X'5552': Abend S0C7-X'0' (Data Exception)
09.54.01 JOB28504 IEA995I SYMPTOM DUMP OUTPUT 091


Any/all help appreciated, thanks.
John A
 
Posts: 2
Joined: Mon May 03, 2010 7:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Conditional change a positive number to negative

Postby CICS Guy » Mon May 03, 2010 9:51 pm

If you are trying to reverse the sign of the 0011111 number, it is packed not zoned.....
CICS Guy
 
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: Conditional change a positive number to negative

Postby Frank Yaeger » Mon May 03, 2010 10:25 pm

John,

Since you want to change a PD field, why are you using ZD format instead of PD format? For the data you show, your OVERLAY operand should be:

          OVERLAY=(4:4,4,PD,MUL,-1,TO=PDC,LENGTH=4))   
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Conditional change a positive number to negative

Postby John A » Tue May 04, 2010 1:21 am

Thansk for the input.

Was pretty dumb on my part, that's why I'm on the beginner's forum.

Thanks again.
John A
 
Posts: 2
Joined: Mon May 03, 2010 7:37 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post