MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

XOR Operation on the records of a file.
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Wed Oct 06, 2004 7:05 am    Post subject: Reply with quote

Phantom,

Did you try looking at the samples listed here?

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA00/4.13?DT=20031124143823

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Oct 06, 2004 10:32 am    Post subject: Reply with quote

Quote:
With a COBOL exit, DFSORT does the I/O if COBOL sets FASTSRT in effect, or COBOL does the I/O if COBOL sets NOFASTSRT in effect.


Now that I read this again, I see it's confusing.

There are two types of "COBOL exits".

The type of exit involving NOFASTSRT is "generated" by a COBOL program that calls SORT. You don't write this exit yourself - COBOL generates it for you as an interface to DFSORT in the case where the COBOL program needs to do the I/O itself for some reason. If the COBOL program can allow DFSORT to do the I/O directly, then the FASTSRT interface is used and an exit is NOT involved.

The other type of exit is a COBOL exit that you write yourself and tell DFSORT to use via the MODS statement. The samples in "DFSORT Application Programming Guide" that Kolusu referenced are for this second type of COBOL exit. A COBOL E15 exit can either have DFSORT read SORTIN, pass it records and then pass them back to DFSORT, or can just pass all of the records to DFSORT (no SORTIN)
A COBOL E35 exit receives records from DFSORT, and can either pass the records back to DFSORT, or can "delete" them all.

If you want to know more about DFSORT's E15 and E35 exits, see Chapter 4 of "DFSORT Application Programming Guide".
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Oct 07, 2004 7:56 am    Post subject: Reply with quote

Thanks Frank & Kolusu,

I have a very bad habit. I don't read the manuals from start to end. Whenever I encounter a problem, I search all the documents that I have. Somehow, I missed to see the examples provided in the DFSORT Application programming Guide pdf. I need to change myself somehow..... Mad

I'm reading the 4th Chapter of the App. Prog. Guide now. I will get back to you soon.

Thanks a lot for your help,
Phantom
Back to top
View user's profile Send private message
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Wed Aug 19, 2015 12:34 pm    Post subject: Reply with quote

The first Easytrieve Plus example uses a data-name for the subscript. If W-SUB had been defined as a binary field, the difference between that CPU usage and the index used for subscripting would not have been 100%. This has nothing to do with reference-modification (as a link to this topic thinks).
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Wed Aug 19, 2015 1:16 pm    Post subject: Reply with quote

William Collins wrote:
The first Easytrieve Plus example uses a data-name for the subscript. If W-SUB had been defined as a binary field, the difference between that CPU usage and the index used for subscripting would not have been 100%. This has nothing to do with reference-modification (as a link to this topic thinks).


William,

I cannot test the code with binary variable but are you thinking that easytrieve behaves the same way as COBOL? What is the equivalent of TRUNC(BIN) compiler option for Easytrieve?
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Wed Aug 19, 2015 1:54 pm    Post subject: Reply with quote

Not so much that. The subscript is defined as 4 N, which is COBOL-equivalent PIC 9(4) USAGE DISPLAY.

To use that as a subscript, it will first be packed, then converted to binary, then the calculation.

To add one to it, it will first be packed, have one added, then unpacked.

The index is always binary, so there will be no conversion required.

The index over data-name when used as a subscript will be faster (for same reason as COBOL) but not 50%+ faster (other overhead in the program is masking the exact difference). About 30% faster, I'd expect.

The program is doing very little else, so the subscripting will have a big impact.

I can't test it at the moment either Smile

If someone can, the pseudo-assembler that Easytrieve Plus generates can be listed, to see exactly what is done extra between the two.
Back to top
View user's profile Send private message
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Wed Aug 19, 2015 2:36 pm    Post subject: Reply with quote

Thinking further, in COBOL, for a one-byte OCCURS, a data-name as a subscript is faster than an index as a subscript. No clue if this is the case for Easytrieve Plus.

TRUNC(BIN) is the slowest of the TRUNC options for COBOL (generally, although there are specific cases where it is faster).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group