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
 

 

Extracting specific fields from VB dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Extracting specific fields from VB dataset
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 30, 2009 6:16 pm    Post subject:
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    Post subject: Reply to: Extracting specific fields from VB dataset
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 30, 2009 7:00 pm    Post subject:
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 Moderator


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

PostPosted: Tue Jun 30, 2009 9:22 pm    Post subject:
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    Post subject: Reply to: Extracting specific fields from VB dataset
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    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 Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


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