Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort using OutREC

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

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Mon Jul 21, 2008 11:45 pm    Post subject: Sort using OutREC
Reply with quote

Trying to understand

OUTREC FIELDS=(1:21,80,X,82:177,10,92:1,200)

Please help.
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Tue Jul 22, 2008 12:18 am    Post subject:
Reply with quote

Do you have a manual....??
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Tue Jul 22, 2008 12:26 am    Post subject:
Reply with quote

No, i am browsing the web, but different examples,

could you pls provide me the manual? and let me know what exactly this step is doing.
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: Tue Jul 22, 2008 1:08 am    Post subject:
Reply with quote

The DFSORT books are available at:

www.ibm.com/systems/support/storage/software/sort/mvs/srtmpub.html

Code:

  OUTREC FIELDS=(1:21,80,X,82:177,10,92:1,200)


OUTREC reformats the input records as follows:

1:21,80 - copies input positions 21-100 to output positions 1-80
X - inserts a blank at output position 81 (not needed since 82: does the same thing).
82:177,10 - copies input positions 177-186 to output positions 82-91
92:1,200 - copies input positions 1-200 to output positions 92-291.

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.
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Tue Jul 22, 2008 2:13 am    Post subject: Reply to: Sort using OutREC
Reply with quote

Thanks a lot.
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Thu Jul 24, 2008 9:20 pm    Post subject: Reply to: Sort using OutREC
Reply with quote

Frank,

Please check my understanding, correct me where i am wrong--

The soultion by u--
1:21,80 - copies input positions 21-100 to output positions 1-80
X - inserts a blank at output position 81 (not needed since 82: does the same thing).
82:177,10 - copies input positions 177-186 to output positions 82-91
92:1,200 - copies input positions 1-200 to output positions 92-291.

**********

21+80-1 and u are saying 21-100 to 1-80( as X is between and next field is at 82)

177+10-1 and 177-186 to 82-91(as next field is at 92)

1+200-1 and 1-200 to 92-291(please let me know about 291, is it(200+92-1(1 as 92:1)) or something else)


Please let me know.
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Thu Jul 24, 2008 9:36 pm    Post subject: Reply to: Sort using OutREC
Reply with quote

One more thing--

In the existing layout on which sort is done there 1:200 is the label for the copybook like--

--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START END LENGTH
SDNIRPS 1 200 200
5 SPT-PIN-NBR X(12) 1 1 12 12
5 SPT-FILLER1 XX 2 13 14 2


Please let me know how how will i pre pare new copy book wih this.
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: Thu Jul 24, 2008 9:41 pm    Post subject:
Reply with quote

Meenakshi,

I''m not sure I understand what you're asking.

Quote:
please let me know about 291, is it(200+92-1(1 as 92:1)) or something else)


It's 92+200-1 = 291.

92 is the output start position. 200 is the length.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Thu Jul 24, 2008 9:50 pm    Post subject:
Reply with quote

Quote:
1+200-1 and 1-200 to 92-291(please let me know about 291, is it(200+92-1(1 as 92:1)) or something else)


First 200 characters get copied to the position from 92 to 291.
You ll find more info in the manual as Frank suggested.

Thanks,
Arun
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
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us