|
|
| Author |
Message |
Bindu Bhama
New User
Joined: 04 Oct 2004 Posts: 2
|
|
|
|
i have unloaded two fields(x(20) and x(10)) from a db2 table using D2P4PROC.
It automatically creates a PS file in VB format.In the next JCL
step i am sorting and copying only the last 20 characters into another
GDG in FB format.The sort card i used is
INCLUDE COND=(22,10,CH,GT,C' ')
SORT FIELDS=(1,20,CH,A)
OUTREC FIELDS=(1:11,10,11:22,10)
END
But the outrec statement is failing with the message
"outrec rdw not created"
any solutions?...  |
|
| Back to top |
|
 |
References
|
Posted: Mon Oct 04, 2004 8:24 pm Post subject: Re: OUTREC usage |
 |
|
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3008 Location: Charlotte,NC USA
|
|
|
|
Since your input dataset is RECFM=VB, and your desired output is RECFM=FB, you need to instruct SORT to make the conversion. And, since the input dataset is VB, you must account for the 4-byte Record Descriptor Word (RDW) within the data for your field offsets:
| Code: |
SORT FIELDS=(5,20,CH,A)
OUTFIL INCLUDE=(27,10,CH,GT,C' '),VTOF,
OUTREC=(1:16,10,11:27,10)
|
|
|
| Back to top |
|
 |
Bindu Bhama
New User
Joined: 04 Oct 2004 Posts: 2
|
|
|
|
Thanks a lot.
The following also will work for VB to FB format.
OUTREC FIELDS=(1:15,10,11:26,10),CONVERT |
|
| Back to top |
|
 |
|
|
|