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

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Tue Nov 25, 2008 11:41 pm
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
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
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: 2481
Location: @my desk

PostPosted: Thu Nov 27, 2008 7:54 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts Store the data for fixed length COBOL Programming 1
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 Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top