Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
My INCLUDE doesn't work

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: My INCLUDE doesn't work
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: 3158
Location: Tucson AZ

PostPosted: Thu Jan 04, 2007 1:42 pm    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Thu Jan 04, 2007 1:43 pm    Post subject:
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    Post subject: Re: My INCLUDE doesn't work
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: 3158
Location: Tucson AZ

PostPosted: Thu Jan 04, 2007 1:53 pm    Post subject:
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    Post subject: Re: My INCLUDE doesn't work
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: 1187
Location: Bangalore,India

PostPosted: Thu Jan 04, 2007 2:00 pm    Post subject:
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 Moderator


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

PostPosted: Thu Jan 04, 2007 10:11 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

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

http://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.

http://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    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 More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 8 Thu Jun 29, 2017 1:41 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us