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
 

 

OMIT other unsatisfied records in OUTREC, OUTFIL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
tvinodkumar7

New User


Joined: 06 Jan 2015
Posts: 18
Location: Hyderabad, INDIA

PostPosted: Thu Jan 08, 2015 1:33 pm    Post subject: OMIT other unsatisfied records in OUTREC, OUTFIL
Reply with quote

I am including the records satisfying the condition in IFTHEN as in below attachment

Now I need to OMIT the rest of the records. How can I do that?

Please suggest.

TIA
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7224

PostPosted: Thu Jan 08, 2015 3:20 pm    Post subject: Reply to: OMIT other unsatisfied records in OUTREC, OUTFIL
Reply with quote

Please copy/paste code from your emulator, do not post images.

You just need to have an INCLUDE COND= for the conditions you have with the IFTHENs.
Back to top
View user's profile Send private message
tvinodkumar7

New User


Joined: 06 Jan 2015
Posts: 18
Location: Hyderabad, INDIA

PostPosted: Thu Jan 08, 2015 3:51 pm    Post subject:
Reply with quote

Sure Bill Woodger. Going forward I will copy as per your suggestion.
Thank you for your reply. Its working now.

Also in the BUILD, since I am using the code as
BUILD=(1:1,4,5:1214,18)

since my input is VB, and output is FB, so as no to miss the RDW.
My record is starting from 5th character and first 4 bytes are empty.

How can I get records which start from 1 and also should not miss RDW ?

TIA
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7224

PostPosted: Thu Jan 08, 2015 4:34 pm    Post subject: Reply to: OMIT other unsatisfied records in OUTREC, OUTFIL
Reply with quote

Code:
BUILD=(5,43) or BUILD=(5,39)


When you CONVERT to fixed-length, you BUILD to the fixed-length you want to see on the output, but based on the variable-length of your input to the BUILD. Basically, adjust everything by four to ignore the RDW. Depending how you've calculated 43 already, that may not need to change.
Back to top
View user's profile Send private message
tvinodkumar7

New User


Joined: 06 Jan 2015
Posts: 18
Location: Hyderabad, INDIA

PostPosted: Thu Jan 08, 2015 6:03 pm    Post subject:
Reply with quote

Its working as per my expected result.

Thank you very much Mr. Bill....
Back to top
View user's profile Send private message
tvinodkumar7

New User


Joined: 06 Jan 2015
Posts: 18
Location: Hyderabad, INDIA

PostPosted: Fri Jan 09, 2015 10:56 am    Post subject:
Reply with quote

Now as part of performance tuning,
since if I use OUTREC, we may require more memory for intermediate file.

Hence I planned to use the OUTFIL directly instead of OUTREC as below

Code:
    SORT FIELDS=COPY                                                   
    OUTFIL IFTHEN=(WHEN=((204,3,CH,EQ,C'010',OR,204,3,CH,EQ,C'019'),AND,
                        (206,7,FS,EQ,NUM)),                             
                   BUILD=(1:204,2,3:C'000000000',                       
                          12:206,7,19:39,05,PD,TO=ZD,LENGTH=09,         
                          28:44,07)),                                   
           IFTHEN=(WHEN=(328,3,CH,EQ,C'010',OR,328,3,CH,EQ,C'019'),     
                   BUILD=(1:328,18,19:39,05,PD,TO=ZD,LENGTH=09,         
                          28:44,07))
INCLUDE COND=((206,7,FS,EQ,NUM),OR,                     
              (328,3,CH,EQ,C'010',OR,328,3,CH,EQ,C'019'))


also my input file is 3025 and the required output should have 34 length.

If I give 3025 LRECL in the output file, it is successful, else I am getting the below error

Code:
3025 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 34 BYTE LRECL FOR SORTOUT


Please suggest.

TIA.

Code'd
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7224

PostPosted: Fri Jan 09, 2015 3:29 pm    Post subject: Reply to: OMIT other unsatisfied records in OUTREC, OUTFIL
Reply with quote

DFSORT is designed to do things quickly. There is no way that it correlates your INCLUDE to your processing, so it is unaware that every remaining input record has a BUILD processed for it. You need to use IFOUTLEN which sets the length of the record after the IFTHEN processing has finished.

In a COPY it is not going to make any difference for performance between the INREC, OUTREC and OUTFIL. I still use INREC to "cut it down early". Obviously the impact is when there is a SORT, as reducing the record size before the data is sorted, reduces the amount of data that is tossed around.

Don't specify any DCB information (RECFM or LRECL) on the DD for the output file(s). It means there are two places to maintain the data. SORT will set up everything correctly, which with your example would be the long value, but would change when you make the change to the Control Cards.

Code:
 INCLUDE COND=((206,7,FS,EQ,NUM),OR,                     
              (328,3,CH,EQ,C'010',OR,328,3,CH,EQ,C'019'))

   INREC IFOUTLEN=34,
        IFTHEN=(WHEN=((204,3,CH,EQ,C'010',OR,204,3,CH,EQ,C'019'),AND,
                        (206,7,FS,EQ,NUM)),                             
                   BUILD=(1:204,2,3:C'000000000',                       
                          12:206,7,19:39,05,PD,TO=ZD,LENGTH=09,         
                          28:44,07)),                                   
           IFTHEN=(WHEN=(328,3,CH,EQ,C'010',OR,328,3,CH,EQ,C'019'),     
                   BUILD=(1:328,18,19:39,05,PD,TO=ZD,LENGTH=09,         
                          28:44,07))
    SORT FIELDS=COPY         
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am


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