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 

Sort ASCII files

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


Joined: 15 Jun 2005
Posts: 12
Topics: 7

PostPosted: Thu Jun 23, 2005 9:44 am    Post subject: Sort ASCII files Reply with quote

Hi,
I have a input file in ASCII format i want to filter the records on this condition INCLUDE COND=((1,9,PD,GE,050000000),AND,(1,9,PD,LE,120009999))
but its not working.. but when i give only one codition at a time some files are getting filtered. can any one please tell me how to filter a file with ASCII format.

thanks
bobi
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: Thu Jun 23, 2005 11:06 am    Post subject: Reply with quote

We need to see what the values in positions 1-9 look like. PD would work for packed decimal values, but not if the values are in some other format.

Run this DFSORT job and post the //SYSOUT output:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY,STOPAFT=15
  OUTREC FIELDS=(1,9,HEX)
/*


That will show us what the values look like in hex so we can determine which numeric format would work for them.
_________________
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
bobi
Beginner


Joined: 15 Jun 2005
Posts: 12
Topics: 7

PostPosted: Tue Jun 28, 2005 9:18 am    Post subject: Reply with quote

hi,
here are the values
484541444552202043
303534303030303030
313131303030303030
313630303030303030
323131303030303030
545241494C45522043

Cant we directly sort a file in ascii format
thanks
bobi
Back to top
View user's profile Send private message
dneufarth
Beginner


Joined: 05 Apr 2005
Posts: 11
Topics: 0

PostPosted: Tue Jun 28, 2005 9:42 am    Post subject: Reply with quote

Try changing PD to AC (DFSORT).

Dave
Back to top
View user's profile Send private message
dneufarth
Beginner


Joined: 05 Apr 2005
Posts: 11
Topics: 0

PostPosted: Tue Jun 28, 2005 9:46 am    Post subject: Reply with quote

You may also use CH,GE,x'303530303030303030' and CH,LE,x'313230303039393939'

Dave
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jun 28, 2005 10:09 am    Post subject: Reply with quote

Bobi,

I don't think they are packed decimal numbers.A valid Packed decimal field will have the sign in the lowerbit. A 'c' or 'F' for a positive number and 'D' for a negative number.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Tue Jun 28, 2005 10:52 am    Post subject: Reply with quote

Your hex display shows that this is ASCII character data. You can do what you want using an INCLUDE statement like this:

Code:

   INCLUDE COND=(1,9,BI,GE,X'303530303030303030',AND,   
                 1,9,BI,LE,X'313230303039393939')       

_________________
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
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