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
 

 

What does the alternate sequence Sort Parameter does?

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

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Wed May 09, 2007 9:01 pm    Post subject: What does the alternate sequence Sort Parameter does?
Reply with quote

Hi all,

In the below JCL what does the alternate sequence does? and what is the function of that here? why we need to specify the values and what are the functional work of it? Can any one clear me out in simple words with quick ref??? icon_cry.gif
Code:

//STEP0050 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN5,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
  SORT  FIELDS=(5,3,AQ,A)
  ALTSEQ CODE=(6141,6242,6343,6444,6545,6646,6747,6848,6949,
              6A4A,6B4B,6C4C,6D4D,6E4E,6F4F,7050,7151,7252,
              7353,7454,7555,7656,7757,7858,7959,7A5A)
/*
//*
icon_cry.gif
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: Wed May 09, 2007 9:52 pm    Post subject:
Reply with quote

It collates X'61'-X'7A' the same as X'41'-X'5A'.

For example, if you had these hex values in positions 5-7:

410000
610001
410002
610003

SORT FIELDS=(5,3,CH,A) would give you this output:

410000
410002
610001
610003

because X'41' collates before X'61'.

But with SORT FIELDS=(5,3,AQ,A) and the ALTSEQ statement, you would get this output:

410000
610001
410002
610003

because X'41' and X'61' collate the same.

As for why the job was set up to do that, you'd have to ask whoever set it up. Nothing special springs to mind about those particular hex values and why they would need to be collated the same.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed May 09, 2007 10:23 pm    Post subject:
Reply with quote

Frank Yaeger wrote:
Nothing special springs to mind about those particular hex values and why they would need to be collated the same.
Upper and lower case ASCII alphabet.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Wed May 09, 2007 10:49 pm    Post subject:
Reply with quote

Frank,


Quote:
But with SORT FIELDS=(5,3,AQ,A) and the ALTSEQ statement, you would get this output:

410000
610001
410002
610003


So as it returns the same why should we need to use ALTSEQ? In which scenario it will be helpful?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed May 09, 2007 11:56 pm    Post subject:
Reply with quote

Hello,

Is this accurate?
Quote:
So as it returns the same why should we need to use ALTSEQ?


Notice that with and without ALTSEQ, the output is not in same sequence.
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: Thu May 10, 2007 1:37 am    Post subject:
Reply with quote

Quote:
Upper and lower case ASCII alphabet.


Ah, thanks William, that makes sense (I only think in EBCDIC). icon_lol.gif

So it's collating the lowercase and uppercase ASCII letters as the same.

Thus, for example, bBAa will collate as AabB instead of ABab.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Thu May 10, 2007 4:56 pm    Post subject: Re: What does the alternate sequence Sort Parameter does?
Reply with quote

Hi,

As frank says the below as input and
Quote:

For example, if you had these hex values in positions 5-7:

410000
610001
410002
610003


And now given as the following output i guessed both are same!!! icon_redface.gif
Quote:

SORT FIELDS=(5,3,CH,A) would give you this output:

410000
410002
610001
610003

because X'41' collates before X'61'.

But with SORT FIELDS=(5,3,AQ,A) and the ALTSEQ statement, you would get this output:

410000
610001
410002
610003
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 JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm


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