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
 

 

Change command in OUTREC of SORT utility

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

New User


Joined: 20 Jul 2007
Posts: 4
Location: 26,leela nivas, Pari nagar, Sungam, Coimbatore

PostPosted: Tue Sep 11, 2007 12:49 pm    Post subject: Change command in OUTREC of SORT utility
Reply with quote

Hi,

Can someone tell me if it is possible to include a compare for fields in the change command of Outrec part of a sort card?

Say, if the value in position 120 to 125, OR the value from 140 to 145, in the input file, which are both packed decimal values, are greater than 0, then move 'A' to position 300 of the output file, else move 'B' to position 300 of the output file.
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Sep 11, 2007 1:10 pm    Post subject:
Reply with quote

Harish,

Duplicate post?

Anyway sort card for your req -

Code:
//SYSIN DD *
  OPTION COPY                                       
  INREC IFTHEN=(WHEN=(120,6,PD,GT,0,OR,140,6,PD,GT,0),   
       OVERLAY=(300:C'A')),                 
     IFTHEN=(WHEN=NONE,OVERLAY=(300:C'B'))         
/*
Back to top
View user's profile Send private message
Harish Kumar

New User


Joined: 20 Jul 2007
Posts: 4
Location: 26,leela nivas, Pari nagar, Sungam, Coimbatore

PostPosted: Tue Sep 11, 2007 1:31 pm    Post subject: Reply to: Change command in OUTREC of SORT utility
Reply with quote

thanks for the reply....

but can this be used for both INREC and OUTREC statemeents?

Also, is this an alternative to the CHANGE command?
Back to top
View user's profile Send private message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Tue Sep 11, 2007 2:31 pm    Post subject:
Reply with quote

Hi Harish,

1. Yes, this can be used in both INREC and OUTREC.

2. I guess, this is not an alternative to CHANGE command. This is because with the help of change command you can change or replace a string, but you cannot compare the value of a field.

--Parag
Back to top
View user's profile Send private message
Harish Kumar

New User


Joined: 20 Jul 2007
Posts: 4
Location: 26,leela nivas, Pari nagar, Sungam, Coimbatore

PostPosted: Tue Sep 11, 2007 2:54 pm    Post subject: Reply to: Change command in OUTREC of SORT utility
Reply with quote

thanks a lot guys....saved my day!!
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 Sep 11, 2007 8:45 pm    Post subject:
Reply with quote

Harish wrote
Quote:
Also, is this an alternative to the CHANGE command?


IFTHEN clauses can do everything the CHANGE function can do, and more.

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
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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