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
 

 

Problem in copying variable length record using sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Pune

PostPosted: Tue Apr 24, 2007 1:22 pm    Post subject: Problem in copying variable length record using sort
Reply with quote

Hi,
I am trying to copy one column of the VB length record file to output VB record. But to do this we need to specify the first 4 bytes to RDW of the variable-length output record.
But I am not sure how to specify the first 4 bytes to RDW. Can any one help to solve this.
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 Apr 24, 2007 1:30 pm    Post subject:
Reply with quote

What do you mean you have to specify the first 4 bytes ?

What have you tried so far, and what were the results.
What examples have you looked at
Take a look at the reference material thread posted by Frank, and then go look at the books. All will be revealed.
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Pune

PostPosted: Tue Apr 24, 2007 2:10 pm    Post subject:
Reply with quote

thanx...
I will look in to the material ...
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Pune

PostPosted: Tue Apr 24, 2007 2:27 pm    Post subject:
Reply with quote

Hi Expat,

I have referred some material, in that it is mentioned "For variable-length records, the first entry in the FIELDS parameter must specify or include the 4-byte record descriptor word (RDW). DFSORT sets the length of the reformatted record in the RDW. "

Here my question is how to specify or include the 4-byte RDW? I want to know the syntax for that...I have'nt find syntax in that material..

Please suggest...
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Tue Apr 24, 2007 3:05 pm    Post subject:
Reply with quote

mahi,

I think you are trying to copy a VB file to FB file.. rite.. if so then you have to use the 'CONVERT' or 'VTOF' option in the sort..
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 Apr 24, 2007 3:16 pm    Post subject:
Reply with quote

Yes, you could copy to an FB file also.

For the VB to VB, OUTFIL OUTREC=(1,4,29,44)
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 Apr 24, 2007 3:17 pm    Post subject:
Reply with quote

OUTFIL OUTREC=(1,4,29,44)

The RDW is (1,4

The data being copied is 29,44
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Pune

PostPosted: Tue Apr 24, 2007 3:40 pm    Post subject:
Reply with quote

Thank You Expat...
I want to copy the 10 to 20 bytes of input to output file then how should I specify the OUTREC...?
Is it like OUTREC FIELDS-(1,4,5:10,10)???
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 Apr 24, 2007 3:49 pm    Post subject:
Reply with quote

I would guess that depends one the sort product you are using,
my example was for DFSORT
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Tue Apr 24, 2007 4:44 pm    Post subject:
Reply with quote

expat.. u r rite first 4 bytes contains the RDW so the outrec for VB to VB must be with OUTREC FIELDS=(1:1,4,... )
1:1,4 is the RDW field and continue with your reformat...
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 Apr 24, 2007 8:38 pm    Post subject:
Reply with quote

Quote:
I want to copy the 10 to 20 bytes of input to output file then how should I specify the OUTREC...?
Is it like OUTREC FIELDS-(1,4,5:10,10)???


For a VB file, the RDW is in positions 1-4, so the first data byte starts in position 5. So the tenth data byte starts in position 14. Assuming that's what you want, you would use:

Code:

   OPTION COPY
   OUTREC FIELDS=(1,4,14,10)


If you want to start with the tenth byte (counting the RDW) you would use 10,10 instead of 14,10.
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Pune

PostPosted: Tue Apr 24, 2007 11:25 pm    Post subject:
Reply with quote

Thank You Frank....
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 Record Not found in AlX but record re... mukun264 COBOL Programming 2 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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