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: 2276
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts RMM: scratching a volume that RMM thi... Hervey Martinez IBM Tools 0 Mon May 15, 2017 8:51 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am


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