View previous topic :: View next topic
|
Author |
Message |
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi,
when i am copying part of the record of VB file of length 4004. iam got the error: OUTREC RDW not included. I want to copy from 61st position to end of the record.
the control card i mentioned as below:
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1:65,4008)
/* |
The LERECL of output file i mentioned as 3943.
can any one tell me how to resolve this issue ?
Regards
Suneel |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I would guess that the output is VB as well as the input.
Positions 1-4 are reserved for the RDW, so you need to write from pos 5 not pos 1. |
|
Back to top |
|
|
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi,
After i mentioned position 5 also i got the same error.
Regards
Suneel |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
It may be worth taking a look in the manual, because it is a very long time I have used sort to create VB records from any other record, but I can recall having to specify or copy the RDW from the input record by using 1,4 as the first operand in the control statement. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Suneel,
Quote: |
The LERECL of output file i mentioned as 3943. |
Code: |
OUTREC BUILD=(1:65,4008)
|
If you still get the error after including the RDW, then this might be the problem
You are building records of length 4008 from byte 65 when actually the output record length is 3943.
POst the entire JCL. |
|
Back to top |
|
|
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi
Below is the entire jcl:
Code: |
//JS020 EXEC PGM=SORT
//SORTIN DD DSN=i/p file name,
// DISP=SHR
//SORTOUT DD DSN=o/p file name,
// DISP=(,CATLG,DELETE),
// UNIT=PERMDA,MGMTCLAS=MB004408,
// SPACE=(CYL,(15,20),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(5:65,4008)
/*
|
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Try this -
Code: |
SORT FIELDS=COPY
OUTREC BUILD=(1,4,65,3943) |
|
|
Back to top |
|
|
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi Anju,
I tried with the same but it failed with error
OUTREC FIELD OUTSIDE RANGE
Regards
Suneel |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Suneel,
Try this
Code: |
SORT FIELDS=COPY
OUTREC BUILD=(1,4,65,3939) |
|
|
Back to top |
|
|
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi Aaru,
I tried but i got the error like OUTREC - SHORT RECORD
Regards
Suneel |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
try
Code: |
OPTION COPY
OUTREC BUILD=(1,4,65)
|
Gerry |
|
Back to top |
|
|
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi Aaru,
It failed with the error
OUTPUT LRECL DIFFERS FROM SORTOUT LRECL
SORTOUT HAS INCOMPATIBLE LRECL
CONVERT FEATURE CANNOT BE USED WITH OVERLAY OR IFTHEN
Regards
Suneel |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Suneel,
Have you actually read any of your SYNCSORT documentation ? |
|
Back to top |
|
|
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi,
Yes i read...i trying in some otherways to resolve this issue.
Regards
Suneel |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you tried the suggestion of gcicchet
And also in DFSORT there are OPTION parameters to resolve short records, if you have not already resolved that one. |
|
Back to top |
|
|
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi,
Yes, i have tried that one also failed.
Regards
Suneel |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
what happens to records less than 61 bytes ?
Gerry |
|
Back to top |
|
|
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi,
I want to strip out the records upto 60...i want to copy from 61 to end of the record.
Regards
Suneel |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Suneel,
We think that we know what you want to do, but unless you post the output showing the exact error messages and answer the questions that you have been asked you are not going to get any help.
Please post the output showing the error messages and text, and try to answer Gerry's question. |
|
Back to top |
|
|
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi,
This is the control car i have used:
OPTION COPY
OUTREC BUILD=(1,4,65)
The following error i got
OUTPUT LRECL DIFFERS FROM SORTOUT LRECL
SORTOUT HAS INCOMPATIBLE LRECL
CONVERT FEATURE CANNOT BE USED WITH OVERLAY OR IFTHEN
Regards
Suneel |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
OUTPUT LRECL DIFFERS FROM SORTOUT LRECL |
Sysout will show you the Output LRECL as well as Sortout LRECL. Make it same.
Thanks,
Arun |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
This thread is Unnecessarily toooo long.. grin.. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Suneel,
From whatever have been posted so far, i dont see your output file format. Is it an FB file or VB file? if your output is an FB file you need to use the CONVERT option in OUTREC.
Quote: |
This thread is Unnecessarily toooo long.. grin.. |
Anuj,
Sorry for making it much longer.
Thanks,
Arun |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
Sorry for making it much longer. |
Methinks that the above quote should have come from the OP |
|
Back to top |
|
|
suneelv
New User
Joined: 26 Aug 2008 Posts: 52 Location: inida
|
|
|
|
Hi Everyone,
Now i corrected all the things and working fine with below control card
//SYSIN DD *
OPTION COPY,
STOPAFT=1000
OUTREC BUILD=(1,4,65)
/*
Thanks & Rgds
Suneel |
|
Back to top |
|
|
|