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
 

 

sorting analysis...pls help:

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

New User


Joined: 21 Aug 2008
Posts: 94
Location: hyd

PostPosted: Tue Oct 29, 2013 6:33 pm    Post subject: sorting analysis...pls help:
Reply with quote

Hi,

Please explain about what outrec is doing in below code:

Code:

SORT FIELDS=(47,29,CH,A,     
                      1,42,CH,A)   
SUM FIELDS=NONE                     
OUTREC FIELDS=(1:1,185,X'00000001',
               190:190,260)         
END                                 





The input rec is having record length of 449.
Is that outrec does ' to place 4 from 185th field. and from 190 to 260 what will happen????
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Oct 29, 2013 6:42 pm    Post subject:
Reply with quote

What results did you get when you tried it ?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Oct 29, 2013 6:44 pm    Post subject: Reply to: sorting analysis...pls help:
Reply with quote

Code:
             
 OUTREC FIELDS=(1:1,185,X'00000001',
               190:190,260)


There is some silliness here.

Firstly, BUILD should be preferred to FIELDS. FIELDS means different things in different places, BUILD only means one thing, so less confusing.

For BUILD (and FIELDS) the default starting position is byte 1. So no need for "1:". 189 bytes are then placed in the output record area, so no need for "190:" either. By including column numbers where they are not needed, clarity is lost and maintenance made more difficult.

Without the OUTREC, the output record would consist of the data 1 for a length of 439.

What the OUTREC is doing is copying 185 bytes from position 1, 260 bytes from position 190, and blatting four bytes to binary one starting at 186.

It should be noted that OUTREC runs after the SUM, so you may now end up with records which are identical but for which duplicates would have been dropped if INREC was used instead of OUTREC.

The code should be

Code:
  OVERLAY=(186:X'00000001')


It should be on INREC if you want the SUM to take account of it, else on OUTREC.
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 Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Dump analysis of an assembler module monica1 PL/I & Assembler 4 Tue May 09, 2017 10:05 am
No new posts Why TS/OP would Not contact site supp... RahulG31 All Other Mainframe Topics 4 Wed Mar 22, 2017 7:46 am
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am


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