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
 

 

SYNCSORT Copying a VB file using OUTREC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
abhay pratap singh

New User


Joined: 22 Nov 2007
Posts: 77
Location: noida

PostPosted: Tue Feb 12, 2008 8:31 pm    Post subject: SYNCSORT Copying a VB file using OUTREC
Reply with quote

I have a physical sequential(PS) file which is VB and length of 14172. I want to remove data of 44th to 50th column and move data from 51st column to 44th column in the output file.
I tried using OUTREC facility in SORT utility but not getting the expected result. Below is the outrec statement i have used

Code:

  SORT FIELDS=COPY
  OUTREC FIELDS=(1:1,43,44:51,14165)


Can anyone provide me solution.
Back to top
View user's profile Send private message

Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Feb 12, 2008 10:40 pm    Post subject:
Reply with quote

Try the following:
Code:

SORT FIELDS=COPY
OUTREC FIELDS=(1:1,43,44:51)
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Tue Feb 12, 2008 10:55 pm    Post subject: Reply to: SYNCSORT Copying a VB file using OUTREC
Reply with quote

And since this is a VB file, you may want to take in account the first 4 RDW too.

So this is how your OUTREC should look like.

Code:
OUTREC FIELDS=(1:1,4,5:5,43,48:55)
OR                               
OUTREC FIELDS=(1:1,47,48:55)     
Back to top
View user's profile Send private message
abhay pratap singh

New User


Joined: 22 Nov 2007
Posts: 77
Location: noida

PostPosted: Wed Feb 13, 2008 10:15 am    Post subject: Re: Reply to: SYNCSORT Copying a VB file using OUTREC
Reply with quote

priyesh.agrawal wrote:
And since this is a VB file, you may want to take in account the first 4 RDW too.



In case of PS do we also need to take care of 4 RDW bytes or it is in case of only VSAM files.
Back to top
View user's profile Send private message
Santoshdorge

New User


Joined: 27 Jun 2006
Posts: 48
Location: Pune

PostPosted: Wed Feb 13, 2008 10:43 am    Post subject: Re: Reply to: SYNCSORT Copying a VB file using OUTREC
Reply with quote

Hi

Quote:
In case of PS do we also need to take care of 4 RDW bytes or it is in case of only VSAM files.


We need to take care of 4 RDW bytes in case of VB record format no matter which file organisation you r using( PS/VSAM).


Thanks,
Santosh.
Back to top
View user's profile Send private message
abhay pratap singh

New User


Joined: 22 Nov 2007
Posts: 77
Location: noida

PostPosted: Wed Feb 13, 2008 11:34 am    Post subject: Re: Reply to: SYNCSORT Copying a VB file using OUTREC
Reply with quote

Thanks all for providing the solution.
Back to top
View user's profile Send private message
geethaelisha

New User


Joined: 03 Mar 2004
Posts: 1

PostPosted: Thu May 26, 2011 12:29 pm    Post subject: Reply to: SYNCSORT Copying a VB file using OUTREC
Reply with quote

Priyesh's reply was very useful for me. The second option given did not work for me. I had to give the RDW block separately. icon_smile.gif
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu May 26, 2011 12:34 pm    Post subject:
Reply with quote

Always nice adding comments to a 3 year old thread icon_biggrin.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu May 26, 2011 12:46 pm    Post subject: Reply to: SYNCSORT Copying a VB file using OUTREC
Reply with quote

good to see that we have somebody who, contrary to the habits of these forums does some searching and reading on his own !
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 May 26, 2011 2:38 pm    Post subject:
Reply with quote

And I wonder, geethaelisha, has made only 1 post since inception and that too of this nature! icon_smile.gif
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Thu May 26, 2011 11:52 pm    Post subject: Re: Reply to: SYNCSORT Copying a VB file using OUTREC
Reply with quote

priyesh.agrawal wrote:
And since this is a VB file, you may want to take in account the first 4 RDW too.

So this is how your OUTREC should look like.

Code:
OUTREC FIELDS=(1:1,4,5:5,43,48:55)
OR                               
OUTREC FIELDS=(1:1,47,48:55)     


Hi Priyesh,

Can you clarify one thing.... If we are copying 1st 4 bytes as it is... will it not make any problem as we are altering the VB length as not copying some bytes.??
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri May 27, 2011 12:19 am    Post subject: Re: Reply to: SYNCSORT Copying a VB file using OUTREC
Reply with quote

gylbharat wrote:
priyesh.agrawal wrote:
And since this is a VB file, you may want to take in account the first 4 RDW too.

So this is how your OUTREC should look like.

Code:
OUTREC FIELDS=(1:1,4,5:5,43,48:55)
OR                               
OUTREC FIELDS=(1:1,47,48:55)     


Hi Priyesh,

Can you clarify one thing.... If we are copying 1st 4 bytes as it is... will it not make any problem as we are altering the VB length as not copying some bytes.??

Since Priyesh has not been heard from in nearly two years, I suspect that he will not clarify...

DFSORT would require the unedited RDW be copied. I can't say for certain, but it is very likely that SyncSort requires the same.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Fri May 27, 2011 4:30 pm    Post subject: Re: Reply to: SYNCSORT Copying a VB file using OUTREC
Reply with quote

Akatsukami wrote:
gylbharat wrote:
priyesh.agrawal wrote:
And since this is a VB file, you may want to take in account the first 4 RDW too.

So this is how your OUTREC should look like.

Code:
OUTREC FIELDS=(1:1,4,5:5,43,48:55)
OR                               
OUTREC FIELDS=(1:1,47,48:55)     


Hi Priyesh,

Can you clarify one thing.... If we are copying 1st 4 bytes as it is... will it not make any problem as we are altering the VB length as not copying some bytes.??


Since Priyesh has not been heard from in nearly two years, I suspect that he will not clarify...

DFSORT would require the unedited RDW be copied. I can't say for certain, but it is very likely that SyncSort requires the same.


As DFSORT requires the unedited RDW, Then how it is able to determine the correct length of the file?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri May 27, 2011 7:08 pm    Post subject: Re: Reply to: SYNCSORT Copying a VB file using OUTREC
Reply with quote

gylbharat wrote:
Akatsukami wrote:
DFSORT would require the unedited RDW be copied. I can't say for certain, but it is very likely that SyncSort requires the same.


As DFSORT requires the unedited RDW, Then how it is able to determine the correct length of the file?

I do not know DFSORT/SyncSort internals, but I expect that they track the length of the logical record that they are working with, and update the RDW accordingly.
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: Fri May 27, 2011 9:40 pm    Post subject:
Reply with quote

Quote:
As DFSORT requires the unedited RDW, Then how it is able to determine the correct length of the file?


DFSORT does NOT require the unedited RDW for the reformatted record. It just requires the RDW (1,4) as a "placeholder" since a VB record requires an RDW as the first four bytes. DFSORT determines the record length dynamically and puts it in the first two bytes of the RDW.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Fri May 27, 2011 11:46 pm    Post subject:
Reply with quote

Thanks Frank for the explanation... icon_smile.gif
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 syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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