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
 

 

sort in ascending order

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

New User


Joined: 20 Apr 2007
Posts: 13
Location: chennai

PostPosted: Thu Feb 16, 2012 1:29 pm    Post subject: sort in ascending order
Reply with quote

dear all,

I opened one pds member and then i typed some contents,now when i type SORT in command line.it provides sorted output in ascending order.so i considered ASCENDING is default.

But when i tried the following code,its showing error.

for example:

Code:

//jobcard
//step exec pgm=sort
//sysprint dd sysout=*
//sysout dd sysout=*
//sortin dd dsn=inputfile...,disp=shr
//sortout dd dsn=outputfile..,disp=shr
//sysin dd *
     sort fields=(1,1,ch)
/*


Note:i voluntarily removed "A" after "CH" in sort control statement.

May i know the reason for this......
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: Fri Feb 17, 2012 12:22 am    Post subject:
Reply with quote

The syntax for the DFSORT SORT FIELDS operand requires A or D (or E). There is no default. So you can specify:

Code:

   SORT FIELDS=(1,1,CH,A)

or

   SORT FIELDS=(1,1,A),FORMAT=CH

or

   SORT FORMAT=CH,FIELDS=(1,1,A)


but you can't omit the A.

All of the DFSORT syntax is documented in "z/OS DFSORT Application Programming Guide" and you must abide by it or you will get errors. You can find all of the DFSORT books at:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1746
Location: Bloomington, IL

PostPosted: Fri Feb 17, 2012 12:27 am    Post subject:
Reply with quote

I believe Inba is confusing the SORT primary command of ISPF Edit with DFSORT. Bottom line: they are different products developed by different people (although both for IBM), so there is no reason that they should have identical interfaces.
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 Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


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