View previous topic :: View next topic
|
Author |
Message |
shivkumar
New User
Joined: 06 Mar 2009 Posts: 8 Location: Pune
|
|
|
|
Hi,
I want to do a addition of all the records, which starts from position 46 and length is 15. The dataset is sign record as;
Input::
+0.0000000
-26.7800000
-75.5600000
+9.0900000
+0.2300000
+0.2300000
+0.2300000
+0.2200000
+0.2300000
+0.2300000
+0.2300000
+0.2200000
+0.2300000
+0.2300000
I am using below Sort card to do addition, but getting some sort error :
SORT FIELDS=COPY
OPTION ZDPRINT
SUM FIELDS=(1:280,8,PD,EDIT=(SIIIIIT.TTTTTTT),SIGNS=(+,-),
65X),
CONVERT
Please help me, thanks in advance.
Regards,
Shiv |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
but getting some sort error : |
What possessed you to post this and then not post the error. . .?
Posting "it didn't work" is quite inconsiderate and a waste of everyone's time.
Post the complete diagnostic information along with the message id's. . . |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Shiv,
There are so many problems with your job, that there's no point in detailing them.
You really haven't explained what you're trying to do or what your records look like, but I'll take some guesses.
Since you're using CONVERT, I'll assume that your input file has RECFM=VB.
Quote: |
starts from position 46 and length is 15. |
I'll assume you're counting the RDW in positions 1-4. If not, use 50 instead of 46 to account for the RDW.
Given all that, you can use a DFSORT job something like the following:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
OUTFIL VTOF,REMOVECC,NODETAIL,BUILD=(80X),
TRAILER1=(TOT=(46,15,SFF,EDIT=(SIIIIIT.TTTTTTT),SIGNS=(+,-)))
/*
|
SORTOUT would have one record with:
If that's not what you want, then you need to do a better job of explaining what you do want. |
|
Back to top |
|
|
shivkumar
New User
Joined: 06 Mar 2009 Posts: 8 Location: Pune
|
|
|
|
Thanks Frank, I got the answer with your code.
Yes, you are right I am using RECFM=VB .
And Sorry guys to not update with Sort error. I will take care for next post, any ways Thanks for help. |
|
Back to top |
|
|
|