Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SORT CARD FOR SIGNED DECIMEL FIELDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: SORT CARD FOR SIGNED DECIMEL FIELDS
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: 6968
Location: porcelain throne

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

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

Site Director


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

PostPosted: Thu Sep 13, 2012 10:07 pm    Post subject:
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    Post subject: Reply to: SORT CARD FOR SIGNED DECIMEL FIELDS
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us