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 

Arthimetic In Sort

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


Joined: 28 Jun 2011
Posts: 1
Topics: 1

PostPosted: Sat Jul 23, 2011 1:34 am    Post subject: Arthimetic In Sort Reply with quote

i have input file like
Code:
2000 100 1000
1000 200 2000
3000 400 5000.         

i want output file
Code:
3100
3200
8400.

how to code dfsort in jcl? please any body can help me?
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Sat Jul 23, 2011 8:07 am    Post subject: Reply with quote

Mohanreddy.nani...
1) You do NOT tag your question on to an old question - you start a new topic
2) Do you really want the JCL or do you want the sort control cards? If you want sort control cards you should have posted in the Utilities section which has a description starting DFSORT. If you want JCL for running DFSort then that is in the DFSort manual.
3) Your data is all over the place so that it is impossible to decipher what you want - use code tags to keep alignment. (preview your post, highlight the text to be encoded and click the code button above the edit box)
4) What is your input record length? Your output record length? The record formats of your files? The start column and lengths of your key fields? The rules for getting from input to output? Can there be duplicates in which case how should they be handled?
5) Suggest you also read the forum rules!
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
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 Jul 25, 2011 11:23 am    Post subject: Reply with quote

mohanreddy.nani,

As Nic mentioned you need to provide more details. However here is a sample job which will create an 8 byte summed up output with leading zeroes suppressed. If you want the leading zeroes then use M11 , instead of M10.

Code:

//STEP0400 EXEC PGM=SORT               
//SYSOUT   DD SYSOUT=*                 
//SORTIN   DD *                         
----+----1----+----2----+----3----+----4
2000 100 1000                           
1000 200 2000                           
3000 400 5000                           
//SORTOUT  DD SYSOUT=*                 
//SYSIN DD *                           
  OPTION COPY                           
  INREC BUILD=(01,4,ZD,ADD,             
               05,3,ZD,ADD,             
               10,4,ZD,M10,LENGTH=8)   
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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