Solved

Mainframe Sort (3rd Try)

Posted on 2012-03-28
1
533 Views
Last Modified: 2012-06-27
Apparently, though I am using the paperclip (attach apparatus) it is not actually attaching so I will take your advice, Tom, and paste that along with the original question below.

We have a as an example a file with 10 records.  The first display of this file is at the top of the Below Document which is at this time considered an unsorted file.  On this below display the second group is that same file sorted using the control card SORT FIELDS=(9,12,CH,D), in essence sorting the key field in descending order.  The third group takes the same unsorted file at the top and using the control card SORT FIELDS=(9,12,CH,A) gives you an Ascending sort.  The fourth groups is what I actually need..  I have been told there is a way to get there using an Alternate Sort Sequence in the JCL.  Please assist.  Below are the examples

11978528TPA00020901920111224000004771EJJONES INC                  
10059794TPA00024142520120123000056256HASSELBROCK, WATSON & CASE    
10150152TPB00002540092012013000000257LACEY T & D                  
10150162TPA00025401020120130000000257LACEY T & D                  
10054652TPA00025901220120126000000322FOLLIN TELEPHONES            
50771823TP000020901920111224000004771EJJONES
50013918TP000021861420111216000000609WATSON TIRE SALES            
50013916TP000021861520111216000001218WATSON TIRE SALES            
51028062TPB00022042220120110000021780ACE PLASTICS                  
50059764TP000024142520120123000056256HASSELBROCK, WATSON & CASE    

50059764TP000024142520120123000056256HASSELBROCK, WATSON & CASE
50013916TP000021861520111216000001218WATSON TIRE SALES        
50013918TP000021861420111216000000609WATSON TIRE SALES        
50771823TP000020901920111224000004771EJJONES INC              
51028062TPB00022042220120110000021780ACE PLASTICS              
10150152TPB00002540092012013000000257LACEY T & D              
10054652TPA00025901220120126000000322FOLLIN TELEPHONES        
10150162TPA00025401020120130000000257LACEY T & D              
10059794TPA00024142520120123000056256HASSELBROCK, WATSON & CASE
11978528TPA00020901920111224000004771EJJONES INC

11978528TPA00020901920111224000004771EJJONES INC                    
10059794TPA00024142520120123000056256HASSELBROCK, WATSON & CASE      
10150162TPA00025401020120130000000257LACEY T & D                    
10054652TPA00025901220120126000000322FOLLIN TELEPHONES              
10150152TPB00002540092012013000000257LACEY T & D                    
51028062TPB00022042220120110000021780ACE PLASTICS                    
50771823TP000020901920111224000004771EJJONES INC                    
50013918TP000021861420111216000000609WATSON TIRE SALES              
50013916TP000021861520111216000001218WATSON TIRE SALES              
50059764TP000024142520120123000056256HASSELBROCK, WATSON & CASE          

50771823TP000020901920111224000004771EJJONES INC                    
50013918TP000021861420111216000000609WATSON TIRE SALES              
50013916TP000021861520111216000001218WATSON TIRE SALES              
50059764TP000024142520120123000056256HASSELBROCK, WATSON & CASE  
11978528TPA00020901920111224000004771EJJONES INC                    
10059794TPA00024142520120123000056256HASSELBROCK, WATSON & CASE      
10150162TPA00025401020120130000000257LACEY T & D                    
10054652TPA00025901220120126000000322FOLLIN TELEPHONES              
10150152TPB00002540092012013000000257LACEY T & D                    
51028062TPB00022042220120110000021780ACE PLASTICS
0
Comment
Question by:mheatherton
1 Comment
 
LVL 7

Accepted Solution

by:
garypfirstech earned 450 total points
Comment Utility
I'm not sure exactly what you want the sort to be for the fourth option.  However, have a look at

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca60/3.4?SHELF=EZ2ZO213&DT=20110608113434

for the use of the ALTSEQ CODE.  Be sure to change your SORT FIELDS control card to AQ instead of CH for the third parameter.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
rpgle int catching 4 689
HP-UX change nfile 3 1,591
AS400 SQL Insert 14 651
Calculate the size of the tables on DB2 5 4,210
Marketing can be an uncomfortable undertaking, especially if your material is technology based. Luckily, we’ve compiled some simple and (relatively) painless tips to put an end to your trepidation and start your path to success.
Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now