View previous topic :: View next topic
|
Author |
Message |
sgaid21
New User
Joined: 12 Sep 2006 Posts: 16 Location: Canada
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
sgaid21
New User
Joined: 12 Sep 2006 Posts: 16 Location: Canada
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
"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 |
|
|
sgaid21
New User
Joined: 12 Sep 2006 Posts: 16 Location: Canada
|
|
|
|
Thanks Frank.
I see Syncsort - WERxxxs messages in the SYSOUT, but I'll ask production support if our shop has DFSORT. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sgaid21
New User
Joined: 12 Sep 2006 Posts: 16 Location: Canada
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
sgaid21
New User
Joined: 12 Sep 2006 Posts: 16 Location: Canada
|
|
|
|
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? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
|