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
 

 

Addition of Sign Records thru SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Addition of Sign Records thru SORT
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: 2150
Location: At my coffee table

PostPosted: Fri Jun 25, 2010 7:07 pm    Post subject:
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

Site Director


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

PostPosted: Fri Jun 25, 2010 8:02 pm    Post subject:
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 Moderator


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

PostPosted: Fri Jun 25, 2010 11:02 pm    Post subject:
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    Post subject: Reply to: Addition of Sign Records thru SORT
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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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