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

Sort Card in Variable Block file type


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Thu Jul 26, 2007 1:21 pm
Reply with quote

Hi
I have variable block file for both input and output. The sort card has the following:
Code:

  SORT FIELDS=COPY                                     
  INCLUDE COND=(3,08,CH,EQ,C'KE64 ADD')               
  OUTREC FIELDS=(01:01,04,                             
               05:257,04,PD,EDIT=(TTTTTTT-),         
               13:264,08,PD,EDIT=(TTTTTTTTTTTTTTT-),
               29:285,07,PD,EDIT=(TTTTTTTTTTTTT-))   


and in the input file , there are 3 such data where the condition gets satisfied. But still I am getting ana empty output file.
Please suggest.
Thanks
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 Jul 26, 2007 1:27 pm
Reply with quote

If the input is VB, you must account for the llbb, if the include field is the third byte, its actual displacement is 7, not 3.....
Back to top
View user's profile Send private message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Thu Jul 26, 2007 1:35 pm
Reply with quote

Hi
Can you please explain this:
"you must account for the llbb, if the include field is the third byte, its actual displacement is 7, not 3"

Thanks
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 Jul 26, 2007 1:38 pm
Reply with quote

Like your output: 01:01,04; your real input data starts after the first four bytes containing the RDW.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Jul 26, 2007 2:09 pm
Reply with quote

Mahua,
Mitra check this link in "z/OS DFSORT: Getting Started" for VB file handling in sort
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1cg20/2.1.3?ACTION=MATCHES&REQUEST=RDW,Variable&SHELF=ICE1SH20.bks&DT=20060615173822&TYPE=FUZZY&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jul 26, 2007 2:40 pm
Reply with quote

Hi,

You may need this information:
RDW = Record Descriptor Word: Data preceding a variable record that specifies the length of the entire record including the RDW.

Variable-length records are processed with a record descriptor word (RDW) in positions 1-4, so the data starts in position 5. Fixed-length records are processed without an RDW, so the data starts in position 1. Control statement positions should be specified accordingly.
Back to top
View user's profile Send private message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Thu Jul 26, 2007 3:17 pm
Reply with quote

I have changed the sort card to:
Code:
SORT FIELDS=COPY                                       
INCLUDE COND=(7,04,CH,EQ,C'KE64',AND,8,3,CH,EQ,C'ADD')
OUTREC FIELDS=(01:01,04,                               
               09:257,04,PD,EDIT=(TTTTTTT-),           
               17:264,08,PD,EDIT=(TTTTTTTTTTTTTTT-),   
               33:285,07,PD,EDIT=(TTTTTTTTTTTTT-))   


but the output file is coming empty
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Jul 26, 2007 3:20 pm
Reply with quote

Mahua,

Quote:
7,04,CH,EQ,C'KE64',AND,8,3,CH,EQ,C'ADD'


Check your INCLUDE condition. 8,3,CH,EQ,C'ADD' is making the difference.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jul 26, 2007 3:41 pm
Reply with quote

Mahua,

For better suggestions, please show the input & the expected output.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Jul 26, 2007 3:49 pm
Reply with quote

Mahua,

Your condition is something like this -

Value from 7 to 11 cols - KE64
Value from 8 to 11 cols - ADD

If both the above conds satisfy, record will be written to OP file. As you can see you will not get any record which satisfy the above conditiosn.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top