View previous topic :: View next topic
|
Author |
Message |
shubh
New User
Joined: 01 Oct 2007 Posts: 16 Location: USA
|
|
|
|
I have a file of length 668.
I want to copy this file into another file appending each record with a date field.
What should be the syntax for the OUTREC FIELDS.
I am using
SORT FIELDS=COPY,
OUTREC FIELDS=(1:668,1,'2008-08-18',669)
and its not working.
Please help. Thank you. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Which sort product is used on your system?
If you are not sure, the product name is shown on the informational output created when a sort is executed. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Wow, that's a lot of errors for so few parameters. It's difficult to figure out what you're trying to do given what you've coded. You can't just make up your own syntax and expect it to work.
If you want to append that hardcoded date after the end of each 668 record, you can use these DFSORT statements:
Code: |
SORT FIELDS=COPY
OUTREC OVERLAY=(669:C'2008-08-18')
|
If you want to do something else, explain exactly what it is you're trying to do.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
jsathishbabu84
New User
Joined: 07 Jun 2007 Posts: 22 Location: India
|
|
|
|
Shubh,
You can try this,
SORT FIELDS=COPY
OUTREC FIELDS=(1,668,669:C'2008-08-18')
The output dataset should have LRECL=678
Regards,
SJ |
|
Back to top |
|
|
shubh
New User
Joined: 01 Oct 2007 Posts: 16 Location: USA
|
|
|
|
Thanks.......
that worked..... |
|
Back to top |
|
|
|