Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us