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

Operations like (Addition or Subtraction) using SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sgaid21

New User


Joined: 12 Sep 2006
Posts: 16
Location: Canada

PostPosted: Thu Jun 07, 2007 1:55 am
Reply with quote

Hello,

Can anyone tell me if I can do any operations like (Addition or Subtraction) using SYNCSORT and if yes, how?

For example, I/P file has fields f1,f2....fn and I just need to write records that f19 > f2 + f3 + f10 in the O/P file.

Thanks.
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: Thu Jun 07, 2007 2:27 am
Reply with quote

Yes, you can do add, subtract, multiply, divide and modulo with DFSORT.

See the following for details:

Use [URL] BBCode for External Links

Quote:
For example, I/P file has fields f1,f2....fn and I just need to write records that f19 > f2 + f3 + f10 in the O/P file.


I don't know what you mean by this. If you need more specific help, please show an example of your input records and the expected output records, and explain the "rules" for going from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file.
Back to top
View user's profile Send private message
sgaid21

New User


Joined: 12 Sep 2006
Posts: 16
Location: Canada

PostPosted: Thu Jun 07, 2007 4:22 am
Reply with quote

Thanks a lot, I'll try to use DFSORT, but I don't know if our shop has this utility or not. We are usually using SORT instead.
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: Thu Jun 07, 2007 5:15 am
Reply with quote

"SORT" is just an alias for your sort product, which might be DFSORT, Syncsort or CA-Sort. You can which one you have from the messages it produces:

DFSORT - ICExxxs messages (e.g. ICE000I)
Syncsort - WERxxxs messages
CA-Sort - CASxxxs messages
Back to top
View user's profile Send private message
sgaid21

New User


Joined: 12 Sep 2006
Posts: 16
Location: Canada

PostPosted: Thu Jun 07, 2007 5:22 am
Reply with quote

Thanks Frank.
I see Syncsort - WERxxxs messages in the SYSOUT, but I'll ask production support if our shop has DFSORT.
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: Thu Jun 07, 2007 5:25 am
Reply with quote

Hello,

Please look at the output from any sort you have run. This will tell you which sort you are using. In many locations "SORT" is the name specified on the EXEC PGM= statement and is often defined as an alias to the actual sort program.

If you'd like more info or have questions, post the sysout from a sort along with your question(s).

Also, please re-read Frank's post and supply that requested info. When you show your fields, it will help if you post them by displacement, length and data-type within the record rather than by field-name (i.e. f1, f2, etc).
Back to top
View user's profile Send private message
sgaid21

New User


Joined: 12 Sep 2006
Posts: 16
Location: Canada

PostPosted: Thu Jun 07, 2007 5:41 am
Reply with quote

Thanks for all your help, here is what I mean f1, f2 ...fn.

I/P File is LRECL=80 and I need to filter out records as
f2=pos(5,8,PD)
f3=pos(13,8,PD)
f10=pos(50,8,PD)
f19=pos(73,8,PD)

So, need just records that have (f2 + f3 + f10) < f19.

I know just compare between two fields using INCLUDE COND but I never use ICETOOL because we use PGM=SORT not DFSORT but I see from the PDF that DFSORT has more functionality more than SORT.
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: Thu Jun 07, 2007 5:49 am
Reply with quote

Quote:
I know just compare between two fields using INCLUDE COND but I never use ICETOOL because we use PGM=SORT


You're a bit confused.

INCLUDE can be used with PGM=SORT - it is not exclusive to ICETOOL.

PGM=SORT just executes the sort product at your site which can be DFSORT, Syncsort or CA-Sort. In your case, it's apparently Syncsort.

At any rate: I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
Back to top
View user's profile Send private message
sgaid21

New User


Joined: 12 Sep 2006
Posts: 16
Location: Canada

PostPosted: Thu Jun 07, 2007 6:07 am
Reply with quote

Frank --

Thanks again for clarification and I do understand your position as DFSORT Developer; however, I need answer with YES or NO.

If both products are competitive so that means in SYNCSORT utility has the ability to do "ADD, SUBTRACT, MULT .... etc" as DFSORT utility has.

Is that right? icon_exclaim.gif
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: Thu Jun 07, 2007 6:42 am
Reply with quote

Hello,

You might want to re-think this
Quote:
If both products are competitive so that means in SYNCSORT utility has the ability to do "ADD, SUBTRACT, MULT .... etc" as DFSORT utility has.

Is that right?


One of the things that makes products competitive is that they do not have exactly the same functionality and some of the similar functions are implemented in different ways. Technical products do not compete in the same way as generic products like printer paper or constructoin grade 2x4's which are hard to tell apart once you open the packing.

It is time to get out your Fine Syncsort Manual and see if you can do what you want. I believe you will have this running more quickly if you put together the small bit of program code you'd need to do this.

What version of Syncsort are you running?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Jun 07, 2007 6:47 am
Reply with quote

sgaid21 wrote:
If both products are competitive so that means in SYNCSORT utility has the ability to do "ADD, SUBTRACT, MULT .... etc" as DFSORT utility has.
If your shop has a license for Syncsort, get off your "butt" and contact SyncSort Mainframe Support at 201.930.8260 or zos_tech@syncsort.com (from your company email) and request all the "current" docs they have available....
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Syncsort "Y2C" Function SYNCSORT 1
No new posts Arithmetic division using Syncsort SYNCSORT 6
Search our Forums:

Back to Top