IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SORT CARD FOR SIGNED DECIMEL FIELDS


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maki_psg

New User


Joined: 28 Jan 2010
Posts: 47
Location: India

PostPosted: Thu Sep 13, 2012 4:49 pm
Reply with quote

Hi,

I have a sort card to sum up the decimal values as below. But this is working for only unsigned values. How to use the same thing for signed fields. ie, if the same suming up field is a signed one, this is not working. please help me.

Code:
//STEP1    EXEC PGM=SORT                                               
//SORTIN   DD DSN=USER.FILE1,DISP=SHR                                   
//SORTOUT  DD DSN=USER.FILE2,...                   
//SYSIN    DD *                                                         
    INREC FIELDS=(1,2484,2485,14,UFF,ZD,LENGTH=14,2499,1102)           
    SORT FIELDS=(2720,11,CH,A)                                         
    SUM FIELDS=(2485,14,ZD)                                             
    OUTREC FIELDS=(1,2484,2486,11,C'.',2497,2,2499,1102)               
/*                                                                     
//SYSOUT   DD SYSOUT=*
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 13, 2012 4:56 pm
Reply with quote

UFF
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 13, 2012 10:07 pm
Reply with quote

Hello,

Do you have this working now?
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Sep 13, 2012 10:24 pm
Reply with quote

maki_psg,

It is not clear as to what you are trying to do. If you use UFF format to convert the data , it ignores the sign. If you have +100 and -100, they both will be converted to a positive value of 100.

You need to use SFF format (Signed Free format) which also takes the sign into consideration.

Use the following Control cards.

Code:

//SYSIN    DD *                                                     
  OPTION ZDPRINT                                                     
  INREC OVERLAY(2485:2485,14,SFF,ZD,LENGTH=14)                       
  SORT FIELDS=(2720,11,CH,A)                                         
  SUM FIELDS=(2485,14,ZD)                                           
  OUTREC OVERLAY=(2485:2485,14,ZD,EDIT=(STTTTTTTTTT.TT),SIGNS=(+,-))
//*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top