View previous topic :: View next topic
|
Author |
Message |
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Plewase do not double-post the same question. The other topic has been removed.
You are getting slow turnaround because you are not posting the necessary info for the people who are avaiable. When an attempt is not successful, you need to post the jcl, the control statements, and the informational messages including their message id. If you get undesirable output, you need to post some of the "bad" output. When you post these details, use copy/paste and Preview. When you are satisfied that your post is as you want, Submit. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Ajay,
The below card should work for you. If not, you need to post some of your input data with file-positions.
Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Input VB,LRECL=2123
//SORTOUT DD DSN=Output VB,LRECL=2127
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,2112,4X,2113) |
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
what happens when you encounter short records ? |
The OP said he wanted to insert 4 spaces in the middle of the record. To me that implies that there aren't any short records up to that point. If there are, then what does it mean to insert 4 spaces for the short records? Does that mean the short records should be padded with blanks up to and including the 4 spaces or what? If padding is required, then an IFTHEN WHEN=INIT clause could be used. If padding is not required, then IFTHEN WHEN=(cond) clauses could be used to handle the short records and non-short records differently. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I assumed that when the OP mentioned 2108 he was counting the RDW, so I suggested:
Code: |
OUTREC BUILD=(1,2108,4X,2109)
|
If the OP was not counting the RDW (which well may be the case), then it would be:
Code: |
OUTREC BUILD=(1,2112,4X,2113)
|
as Arun suggested.
I really wish people who use this Forum would learn how to describe their requirements correctly. It gets really tedious having to guess at what people want.
A perfect example is:
Quote: |
Hi Frank,
It does not seems to be working.
Thanks
Ajay |
How is anyone expected to help given that little piece of non-information.
Sheesh. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
When I'm running the job with below sysin:
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(5,2112,2117:2113,11)
/*
I'm getting an abend : outrec RDW not included. |
Unbelievable. You ignored everything everyone said in this thread!
You don't include the RDW and get an error message saying you didn't include it and still can't figure out that you didn't include it.
The message indicates you're using Syncsort, so I'll drop out now. Good luck (you'll need it). |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
ajay_udl,
For a VB file, you must include the RDW (1,4) in your OUTREC statement. Please make the necessary change to include the RDW, as suggested by multiple people in this thread and then let us know if it works as desired. If there is still a problem, please post your JCL AND the sysout messages so that we can properly assist you further. |
|
Back to top |
|
|
|