IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Addition of Sign Records thru SORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shivkumar

New User


Joined: 06 Mar 2009
Posts: 8
Location: Pune

PostPosted: Fri Jun 25, 2010 4:37 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Jun 25, 2010 7:07 pm
Reply with quote

If the data starts at 46 for 15, why the 280,8?
If the data is display, why the PD?
Have you looked at CSF/FS (signed numeric with optional leading floating sign) or SFF (signed free form numeric)?

I suggest you start looking at z/OS V1R11.0 DFSORT: Getting Started
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jun 25, 2010 8:02 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Jun 25, 2010 11:02 pm
Reply with quote

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:

Code:

    -90.9700000


If that's not what you want, then you need to do a better job of explaining what you do want.
Back to top
View user's profile Send private message
shivkumar

New User


Joined: 06 Mar 2009
Posts: 8
Location: Pune

PostPosted: Tue Jun 29, 2010 4:41 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top