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

My INCLUDE doesn't work


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

New User


Joined: 03 Jan 2007
Posts: 14
Location: Sweden

PostPosted: Thu Jan 04, 2007 1:37 pm
Reply with quote

Hi

I have a file,VB and LRECL=133. All records except the first and the last look like this in the two first positions in hex:

02
FF
02

what I want is to pick out all these records. I'm trying this

Code:

   INCLUDE COND=(1,2,CH,EQ,X'F0F2')


and I have tried

Code:

  INCLUDE COND=(1,2,CH,EQ,C'02')


everytime I get nothing in my output !?


this is my JCL

Code:

//SORT1    EXEC PGM=ICEMAN                               
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,30,,CONTIG)           
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,30,,CONTIG)           
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,30,,CONTIG)           
//SORTIN   DD DSN=filein,DISP=SHR
//SORTOUT  DD DSN=fileout,                   
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(1,1),RLSE),
//            DCB=*.SORTIN                               
//SYSPRINT DD SYSOUT=*                                   
//SYSOUT   DD SYSOUT=*                                   
//SYSIN    DD *                                           


What is wrong ?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Jan 04, 2007 1:42 pm
Reply with quote

Hi Garpen,

That one is easy, since it is variable, you need to skip over the llbb, instead of "1,2" use "5,2" and things will work better.

Bill
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Jan 04, 2007 1:43 pm
Reply with quote

Hi Garpen,

If it is VB file then first four byte will contain RDW.
so u can give

Code:
INCLUDE=(5,2,CH,EQ,C'02')
Back to top
View user's profile Send private message
Garpen

New User


Joined: 03 Jan 2007
Posts: 14
Location: Sweden

PostPosted: Thu Jan 04, 2007 1:48 pm
Reply with quote

Ok, works fine, thanks alot icon_biggrin.gif

I have more questions, since I'm a beginner I need to know how you count the positions to be (5,2,....)

I suppose my syntax is for FB ?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Jan 04, 2007 1:53 pm
Reply with quote

Variable length records are preceded by the RDW, which consists of 2 bytes containing the length of the record and 2 bytes of filler, also refered to as llbb. Incidently, variable records that are blocked have their own length descriptor refered to as LLBB... icon_smile.gif
Back to top
View user's profile Send private message
Garpen

New User


Joined: 03 Jan 2007
Posts: 14
Location: Sweden

PostPosted: Thu Jan 04, 2007 1:56 pm
Reply with quote

As the beginner I am, I'm most grateful for your answers icon_biggrin.gif
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Jan 04, 2007 2:00 pm
Reply with quote

Hi Garpen,

A data set with RECFM=VB and LRECL=133 is a variable-length (VB) data set with a maximum record length of 133-bytes. For a VB data set, different records can have different lengths. The first four bytes of each record contain the Record Descriptor Word or RDW, and the first two bytes of the RDW contain the length of that record (in binary). The first data byte of a VB record is in position 5, after the 4-byte RDW.
so u should be careful while specifing it in sort card if u want to include record of file where first 2 byte of alphatical data is equal to 02

Code:

  INCLUDE=(5,2,CH,EQ,C'02')


here 5 is starting position & 2 is offset as u said u want to include those record where first two byte is equal to 02

Hope it will helpful
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: Thu Jan 04, 2007 10:11 pm
Reply with quote

Garpen,

I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links

For example, you'll find an explanation of VB and FB data sets at:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/1.1.3?DT=20060615173822

and you'll find explanations of using VB records with DFSORT in various places throughout the book, e.g.

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.1.3?DT=20060615173822
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
This topic is locked: you cannot edit posts or make replies. Sort to include records of file 2 int... Java & MQSeries 1
No new posts INCLUDE COND with WHEN=GROUP SYNCSORT 12
No new posts Negative value - packed field - Natur... Java & MQSeries 0
Search our Forums:

Back to Top