MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Character to Zoned Decimal in SORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ha.rajamohamed
Beginner


Joined: 29 Jan 2006
Posts: 71
Topics: 22

PostPosted: Tue Feb 20, 2007 5:01 am    Post subject: Character to Zoned Decimal in SORT Reply with quote

Hi,
Is it possible to convert characters to Zoned Decimal in SORT or ICETOOL.
I am having a requirement where the LRECL is 100 and the content from 11 to 20 is a combinations of spaces and numbers. I need to sort based on 11 to 20 based on ZD.

For example:
12355BBBBB ---> Need to considered as 12355
BBBBBBBB1 ---> Need to considered as 1
Like so..
_________________
RAJA MOHAMED
Back to top
View user's profile Send private message
ha.rajamohamed
Beginner


Joined: 29 Jan 2006
Posts: 71
Topics: 22

PostPosted: Tue Feb 20, 2007 6:18 am    Post subject: Reply with quote

Got the answer... Its UFF, SFF

//SORTP1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Input file
//SORTOUT DD DSN=Output File
//SYSIN DD *
INREC FIELDS=(1,2,3:3,3,UFF,TO=ZD,LENGTH=3,6,45)
OPTION COPY
//ABNLTERM DD SYSOUT=(,)
//SYSPRINT DD SYSOUT=(,)
/*

Thanks
_________________
RAJA MOHAMED
Back to top
View user's profile Send private message
ha.rajamohamed
Beginner


Joined: 29 Jan 2006
Posts: 71
Topics: 22

PostPosted: Tue Feb 20, 2007 6:20 am    Post subject: Reply with quote

Small corrections in the SORT CARD
Very Happy
Quote:

INREC FIELDS=(1,10,11:11,10,UFF,TO=ZD,LENGTH=10,21,80)

_________________
RAJA MOHAMED
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Feb 20, 2007 11:07 am    Post subject: Reply with quote

Note that if you just want to SORT on these type of values, you don't have to convert them to ZD to do that. You can just use DFSORT's UFF format in the SORT statement directly:

Code:

   SORT FIELDS=(11,10,UFF,A)


Of course, you can convert the values if you want to, but this would be an easier way to do it:

Code:

   INREC OVERLAY=(11:11,10,UFF,TO=ZD,LENGTH=10)

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ha.rajamohamed
Beginner


Joined: 29 Jan 2006
Posts: 71
Topics: 22

PostPosted: Wed Feb 21, 2007 3:18 am    Post subject: Reply with quote

Thanks Frank ... yours first SORT card matches my requirement.
Quote:

SORT FIELDS=(11,10,UFF,A)

_________________
RAJA MOHAMED
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group