IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What is the practical usage of INREC?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sushmitha.prasad

New User


Joined: 08 Jul 2008
Posts: 2
Location: India

PostPosted: Mon Sep 01, 2008 1:10 pm
Reply with quote

Where do we use INREC practically? What is the need to reformat the records before sorting? Can you provide me a practical example?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 01, 2008 1:47 pm
Reply with quote

Hi,

The INREC control statement allows you to reformat the input records before they are processed; that is, to define which parts of the input record are to be included in the reformatted input record, in what order they are to appear, and how they are to be aligned.

You do this by defining one or more fields from the input record. The reformatted input record consists of only those fields, in the order in which you have specified them, and aligned on the boundaries or in the columns you have indicated.

You can find complete details of DFSORT's INREC statement online at:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICECA109/3.8?DT=20020722140254
and examples at:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICECA109/3.8.2?SHELF=&DT=20020722140254

If you need something more specific, tell us what exactly you need.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Sep 01, 2008 6:54 pm
Reply with quote

Before answering your question..
Why do you think it is useless?
any reasons???
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon Sep 01, 2008 10:36 pm
Reply with quote

As a practical example, say you have groups of records each with a header that has a key, and detail and trailer records that don't have a key, but you want to sort the groups of records by the key. You could use DFSORT's WHEN=GROUP function in INREC to propagate the key from the first record of the group to the other records of the group and then SORT on the key in every record. You can do this with INREC because it's processed before SORT. You could NOT do this with OUTREC because it's processed after SORT.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Sep 02, 2008 10:48 am
Reply with quote

One more simple example of using inrec is
Overcoming overflow problem while summing.
we need to add ZEROs from inrec to increase the length...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts STEM usage in REXX CLIST & REXX 14
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts INREC PARSE used to sort a CSV file DFSORT/ICETOOL 2
No new posts JCL and TAPE drives: how to maximize ... JCL & VSAM 9
Search our Forums:

Back to Top