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
 

 

Operations like (Addition or Subtraction) using SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Operations like (Addition or Subtraction) using SYNCSORT
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 Moderator


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

PostPosted: Thu Jun 07, 2007 2:27 am    Post subject:
Reply with quote

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

See the following for details:

www.ibm.com/servers/storage/support/software/sort/mvs/uq90053/

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    Post subject: Re: Operations like (Addition or Subtraction) using Sort uti
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 Moderator


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

PostPosted: Thu Jun 07, 2007 5:15 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Jun 07, 2007 5:25 am    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Jun 07, 2007 5:49 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Jun 07, 2007 6:42 am    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Thu Jun 07, 2007 6:47 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


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