Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Syntax for OUTREC FIELDS in SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shubh

New User


Joined: 01 Oct 2007
Posts: 16
Location: USA

PostPosted: Wed Aug 20, 2008 2:36 am    Post subject: Syntax for OUTREC FIELDS in SORT
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 20, 2008 2:43 am    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Aug 20, 2008 3:22 am    Post subject:
Reply with quote

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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
jsathishbabu84

New User


Joined: 07 Jun 2007
Posts: 22
Location: India

PostPosted: Wed Aug 20, 2008 12:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
shubh

New User


Joined: 01 Oct 2007
Posts: 16
Location: USA

PostPosted: Mon Aug 25, 2008 10:54 pm    Post subject: Reply to: Syntax for OUTREC FIELDS
Reply with quote

Thanks.......
that worked.....
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. remove the gap b/w 2 fields shymala COBOL Programming 5 Thu Aug 02, 2018 12:05 pm
No new posts How to remove spaces between variable... Selvarajars DFSORT/ICETOOL 7 Fri Jul 27, 2018 3:58 pm
No new posts OUTREC w. several IFTHEN variants Auryn DFSORT/ICETOOL 2 Thu Jul 19, 2018 8:11 pm
No new posts finding anydata between positions of ... ram_vizag SYNCSORT 13 Tue Jul 17, 2018 9:14 pm
No new posts Comparing Comp-3 fields with greater ... Prateeksichem1 DFSORT/ICETOOL 11 Fri Jul 13, 2018 8:45 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us