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

Extracting specific fields from VB dataset


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Tue Jun 30, 2009 6:05 pm
Reply with quote

Hi,

I am trying to extract specific fields from an VB file. I am sure, my file has some short control fields with is creating problem while pulling out the records. Is there a way to eliminate those records. i.e. (records having short control fields). Or else is there any other way to resolve this issue.

Please find my code below.
INCLUDE COND=(122,9,ZD,EQ,600021134,OR,
122,9,ZD,EQ,600000206)
INREC FIELDS=(1,4,5,17,46,40,122,9,132,17,149,17,276,3,366,17)
OPTION VLSHRT
SORT FIELDS=COPY

I tried the same using OUTREC statement.
INCLUDE COND=(122,9,ZD,EQ,600021134,OR,
122,9,ZD,EQ,600000206)
OPTION VLSHRT
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5,17,46,40,122,9,132,17,149,17,276,3,366,17)

I am getting the same error message for both as specified below.
ICE218A 6 91 BYTE VARIABLE RECORD IS SHORTER THAN 130 BYTE MINIMUM FOR FIELDS

I can able to traceout the issue. But I cannot able to resolve this issue as i dont have much knowledge all DFSORT options.

Can anyone please help me out to resolve this issue.

Note:-
I want this to be done in DFSORT.


Regards
Ashok Kumar K
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 30, 2009 6:16 pm
Reply with quote

Take a look at THIS recent topic which will help you.
Back to top
View user's profile Send private message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Tue Jun 30, 2009 6:45 pm
Reply with quote

Hi Expat,

Thanks a lot for the prompt response.
But, Is there any other way to process all the records including short control fields into consideration.

Thanks
Ashok kumar.K
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 30, 2009 7:00 pm
Reply with quote

If the records are not long enough to contain the control fields, then by default they should be ignored, so why do you want to process them.

What about the fields after the control field ?
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 Jun 30, 2009 9:22 pm
Reply with quote

Ashok,

You have a couple of problems here. Since you're using INREC (or OUTREC), VLSHRT is ignored resulting in short records for the INCLUDE statement. You can fix that by using VLSCMP instead of VLSHRT. That will remove the records that don't contain your INCLUDE field.

But your INREC statement specifies a maximum field of 382 bytes so any record you INCLUDE that is shorter than 382 bytes will also result in an ICE218A message. Thus, if any of the records to be included is shorter than 382 bytes, you'll need to explain what you want to do about those records (remove them? pad them with blanks? something else?).
Back to top
View user's profile Send private message
ashok4u_it

New User


Joined: 12 Mar 2008
Posts: 53
Location: Chennai

PostPosted: Wed Jul 01, 2009 2:29 pm
Reply with quote

Awesome Frank.
VLSCMP worked fine when INCLUDE or OMIT condition is used.

Thanks a lot.

Regards
K.Ashok Kumar
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top