Page 2 of 2

Re: Absolute value operation

PostPosted: Fri Nov 11, 2011 1:49 pm
by pulcinella
You are right.What a fool I am! It really does not make sense to put a negative field and then add a different ... I should have realized before. As in the file I have two amounts at a time, I was wrong. The field that must change is set to 7, not at position 15. The first step was fine but not the second

Thank you very much Frank. What was intended was to make the operation in a single step. The mistake I made was to use the INREC with BUILD, to run gave me error. I really should run it with the overlay.

Thank you both

Re: Absolute value operation

PostPosted: Fri Nov 11, 2011 10:35 pm
by skolusu
pulcinella,

You can also use the following control cards using build and overlay.

//SYSIN    DD *                                                   
  INREC IFOUTLEN=18,IFTHEN=(WHEN=INIT,BUILD=(1,6,120,4,7,8,117,3)),
  IFTHEN=(WHEN=(19,3,SS,EQ,C'J01,J02',AND,11,8,PD,LT,0),           
  OVERLAY=(11:11,8,PD,MUL,-1,TO=PD))                               
  SORT FIELDS=(1,10,CH,A)                                         
  SUM FIELDS=(11,8,PD)                                             
//*