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
 
Sort Card in Variable Block file type

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Sort Card in Variable Block file type
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: 3158
Location: Tucson AZ

PostPosted: Thu Jul 26, 2007 1:27 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Thu Jul 26, 2007 1:38 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Thu Jul 26, 2007 2:40 pm    Post subject:
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Thu Jul 26, 2007 3:20 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Jul 26, 2007 3:41 pm    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Thu Jul 26, 2007 3:49 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 0 Thu Dec 14, 2017 8:13 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 1 Thu Dec 14, 2017 5:46 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm

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