Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

sort on a part of character data type is not working.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
malayajena

New User


Joined: 08 Jul 2006
Posts: 28
Location: Singapore

PostPosted: Tue Nov 25, 2008 11:31 pm    Post subject: sort on a part of character data type is not working.
Reply with quote

Hi All,

I had a requirement where i needed to sort on few first characters of a full length data.But it was not working.here are the details...
File is a VSAM file,
Record format -VB,
Record Length- 120.
The field on which i wanted to sort starts at a position of 42 byte and it extends upto a length of 47 bytes.

And the data was like..
pos-42-88(47 bytes)
F100023\00 251
A000\2345 345
F100345\00 252
and so on...

so what i did was,

include cond=(46,7,ch,eq,c'F100023',46,7,ch,eq,c'F100345')
..but this sort didn't work.It threw maxcc 16 error.

can you let me know what could have gone wrong here.

Thanks.





[/url]
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Nov 25, 2008 11:41 pm    Post subject:
Reply with quote

RC=16 is accompanied by an error message. When I run that control statement with DFSORT, I get:

Code:

            INCLUDE COND=(46,7,CH,EQ,C'F100023',46,7,CH,EQ,C'F100345')   
                                                $                       
ICE007A 0 SYNTAX ERROR                                                   


The syntax error indicates you are missing an 'OR' between the conditions.

This is the correct syntax:

Code:

  INCLUDE COND=(46,7,CH,EQ,C'F100023',OR,46,7,CH,EQ,C'F100345')


If you received some other error, then you need to show the messages you received.
Back to top
View user's profile Send private message
malayajena

New User


Joined: 08 Jul 2006
Posts: 28
Location: Singapore

PostPosted: Thu Nov 27, 2008 7:29 pm    Post subject:
Reply with quote

Sorry, got a bit late,
here are few more details...

input file attributes -
vsam
lrecl- 120

output file attributes:
PS,VBA,
LRECL:120
block size: 1220

And the error shows

ICE218A 6 45 BYTE VARIABLE RECORD IS SHORTER THAN 52 BYTE MINIMUM FOR FIELDS

Let me know if you need more information..

Thansk.
Back to top
View user's profile Send private message
malayajena

New User


Joined: 08 Jul 2006
Posts: 28
Location: Singapore

PostPosted: Thu Nov 27, 2008 7:31 pm    Post subject:
Reply with quote

Hi Frank

Even its not working for one condition.
So i don't think 'OR' is a solution.

Ex:

INCLUDE COND=(46,7,CH,EQ,C'F391562')
OUTREC FIELDS=(1,4,X,5,6,PD,ZD,X,46,47)
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Thu Nov 27, 2008 7:54 pm    Post subject:
Reply with quote

Quote:
So i don't think 'OR' is a solution.
malayajena,

OR was not a solution, it was a part of your requirement.
Quote:
ICE218A 6 45 BYTE VARIABLE RECORD IS SHORTER THAN 52 BYTE MINIMUM FOR FIELDS

You could have easily got through this if you'd referred the DFSORT messages manual which suggests to use VLSCMP or VLSHRT to get rid of this if a variable-length record was too short to contain all INCLUDE or OMIT fields.
Code:
 OPTION VLSCMP
Back to top
View user's profile Send private message
malayajena

New User


Joined: 08 Jul 2006
Posts: 28
Location: Singapore

PostPosted: Sat Nov 29, 2008 4:05 pm    Post subject:
Reply with quote

Thanks Arun and Frank, that works.
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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us