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

Need help in SYNCSORT-- Sorting a VB file


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

New User


Joined: 06 Oct 2006
Posts: 6

PostPosted: Sat Nov 17, 2007 1:13 am
Reply with quote

Hi,
My requirement is I have to change the key length value in VSAM file.
the key length is 36. I want to change the value of the field starting from 24th place to another value.And writes the output to sequential file.
I am giving the SORT condition like this.

The total record length of the input file is 1036.
The input file is VB file and we are writing it to sequential VB file.

SORT FIELDS=COPY
OUTREC BUILD=(1,4,5:1,23,24,8,CHANGE=(8,C'ABCMN006',C'LOCAL '),
32:32,1000)

We are getting the error "OUTREC HAS OVERLAPPING COLUMNS SPECIFIED ".

Any help on this is highly appreciated.

Regards,
Rohit.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Nov 17, 2007 1:18 am
Reply with quote

Do You really think that posting THREE times will give You more answers ??
Back to top
View user's profile Send private message
rohit4u

New User


Joined: 06 Oct 2006
Posts: 6

PostPosted: Sat Nov 17, 2007 1:34 am
Reply with quote

Since the question is same.....i wont mind if i get different answers..
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Nov 17, 2007 1:36 am
Reply with quote

Ah-ha! The keyword is the "SYNCSORT" in the Subject. Now it's in the correct forum.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Nov 17, 2007 9:31 pm
Reply with quote

rohit4u,

Quote:
OUTREC BUILD=(1,4,5:1,23,24,8,CHANGE=(8,C'ABCMN006',C'LOCAL '),
32:32,1000)


In your outrec build,first u r copying the first 4 bytes from the input file and then in the 5th position again you are copying from the first byte till 23. Here overlapping columns are specified and hence the error.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Mon Nov 19, 2007 11:25 pm
Reply with quote

If you do not want to write the RDW to the output twice, then you can simply code:
Code:

//SYSIN DD *
  SORT FIELDS=COPY
  OUTREC BUILD=(1,23,24,8,CHANGE=(8,C'ABCMN006',C'LOCAL '),
  32:32,1000)

However, if you have some reason why it is necessary, then you can modify the last field position as follows:
Code:

//SYSIN DD *
  SORT FIELDS=COPY
  OUTREC BUILD=(1,4,5:1,23,24,8,CHANGE=(8,C'ABCMN006',C'LOCAL '),
  36:32,1000)

If neither of these provide the desired output, then please post the new error message produced.
Back to top
View user's profile Send private message
rohit4u

New User


Joined: 06 Oct 2006
Posts: 6

PostPosted: Mon Nov 19, 2007 11:52 pm
Reply with quote

Hi Alissa,
Thanks for your reply. I tried the way what you have mentioend and got the following error.

OUTREC BUILD=(1,4,5:1,23,24,8,CHANGE=(8,C'CORMN006',C'LOCAL '),
36:32,1000)

8,944K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
0 BYTES RESERVE REQUESTED, 3,425,768 BYTES USED
20K BYTES OF EMERGENCY SPACE ALLOCATED
SORTIN : RECFM=V ; LRECL= 1036; CISIZE = 8192
OUTREC RECORD LENGTH = 1035
SORTOUT : RECFM=V ; LRECL= 1036; BLKSIZE= 1040
5,868K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
0 BYTES RESERVE REQUESTED, 300K BYTES USED
OUTREC - SHORT RECORD
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Nov 20, 2007 11:05 am
Reply with quote

rohit,

Code:
OUTREC - SHORT RECORD


This clearly states that the record length of few records in your VB file is less than the condition specified in your OUTREC BUILD.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Nov 20, 2007 11:11 am
Reply with quote

rohit,

Search this forum for VLSHRT and use that parameter in your sort card.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Tue Nov 20, 2007 10:52 pm
Reply with quote

rohit4u wrote:
The input file is VB file and we are writing it to sequential VB file.

Sorry - I missed that in your original post.

Try this:
Code:

//SYSIN DD *
  SORT FIELDS=COPY
  OUTREC BUILD=(1,4,5:1,23,24,8,CHANGE=(8,C'ABCMN006',C'LOCAL '),
  36:32)
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
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
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top