MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to change TOTAL to numeric, right justifield in sort

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
jimmy_augustine
Beginner


Joined: 23 Jun 2004
Posts: 32
Topics: 13

PostPosted: Mon Feb 13, 2006 11:28 am    Post subject: how to change TOTAL to numeric, right justifield in sort Reply with quote

Code:

//STEP2    EXEC PGM=SORT                                               
 //SYSOUT   DD  SYSOUT=*                                                 
 //SORTIN   DD  DSN=xxxxxx.file01.OUT001.PP.COUNT,DISP=SHR
 //SORTOUT  DD  SYSOUT=*                                                 
 //SYSIN    DD  *                                                       
   SORT FIELDS=COPY                                                     
   OUTFIL NODETAIL,                                                     
   TRAILER1=(COUNT)

and I am getting the out put. But now, I want this output to be in numeric format, righ justified. I tried the following code, but I am getting a syntax error
Code:

 SORT FIELDS=COPY                               
 OUTFIL NODETAIL,                               
 TRAILER1=(COUNT=(1,15,ZD,(EDIT=IIIIIIT))       

Could anyone help?

Thanks
JA
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Feb 13, 2006 11:43 am    Post subject: Reply with quote

jimmy_augustine,

The latest versions of sort enable to have edit format on count function. try this

Code:

//SYSIN    DD *                 
  SORT FIELDS=COPY               
  OUTFIL REMOVECC,NODETAIL,
  TRAILER1=(COUNT=(EDIT=(TTTTTTTTT)))


If you have older versions of sort then try this
Code:

//SYSIN    DD *                 
  SORT FIELDS=COPY               
  OUTREC FIELDS=(SEQNUM,9,ZD,80:X)
  OUTFIL REMOVECC,NODETAIL,       
  TRAILER1=(1,9)     
/*                             


This will produce a 9 byte count on the output file

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Mon Feb 13, 2006 12:55 pm    Post subject: Reply with quote

Code:

   SORT FIELDS=COPY                               
   OUTFIL NODETAIL,                               
     TRAILER1=(COUNT=(1,15,ZD,(EDIT=IIIIIIT))       


You get the syntax error because you have 1,15,ZD inside the COUNT parameter. COUNT is a 15-byte value already, so 1,15,ZD isn't needed. The correct syntax is:

Code:

  SORT FIELDS=COPY                               
  OUTFIL NODETAIL,                               
     TRAILER1=(COUNT=(EDIT=IIIIIIT))       


If you don't want the ANSI carriage control character, you can specify REMOVECC.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jimmy_augustine
Beginner


Joined: 23 Jun 2004
Posts: 32
Topics: 13

PostPosted: Mon Feb 13, 2006 1:44 pm    Post subject: Reply with quote

Thanks many.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group