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

difference between EXECIO and LMGET/PUT


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Thu Oct 14, 2010 7:30 am
Reply with quote

I used to use LMGET and LMPUT to read and write a data set
these days I found EXECIO , which is the best way to read and write a data set? what's the difference between EXECIO and LMGET/PUT?
Is the efficiency different or other ?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Oct 14, 2010 8:43 am
Reply with quote

I do not know which is more efficient, but LMGET/LMPUT have much higher overhead. ISPF is a requirement.

I have not followed any benchmarks... you should try writing a file of about 10,000 lines using both methods and compare the results (elapsed time / service units).
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Thu Oct 14, 2010 10:13 am
Reply with quote

Pedro wrote:
I do not know which is more efficient, but LMGET/LMPUT have much higher overhead. ISPF is a requirement.

I have not followed any benchmarks... you should try writing a file of about 10,000 lines using both methods and compare the results (elapsed time / service units).


yes , you're right , LMGET/LMPUT need the ISPF ,
and the EXECIO runs in both the TSO/E address space and non-TSO/E address spaces
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Oct 14, 2010 6:27 pm
Reply with quote

Just for fun I setup a test for this.

In a single program I read the same file both ways.
The file contained 47298 records.

For the lmget, it was in a loop until rc > 0.

For the execio, I read the file into a stem variable and accessed each occurance in a loop after the execio statement.

No other processing on the data was performed.

The results are:
Code:

READY
 PROFILE NOPREFIX
READY
 ISPSTART CMD(%BENCHIO LMGET EXECIO)
IN BENCHIO - LMGET EXECIO
LMGET  ELAPSED TIME - 8.564209 47298
EXECIO ELAPSED TIME - 0.341466 47298


A side note, I also ran the execio process without starting ISPF.
There was no noticable change in time.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Oct 14, 2010 6:46 pm
Reply with quote

Dave,

was this test run in background?

did you use dd statements to allocate the file(s)?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Oct 14, 2010 6:55 pm
Reply with quote

Yes it was run in the background.

For the execio process, the file was allocated in the jcl.

For the lmget, I used lminit, lmopen, lmget(in loop).

I did run this again in the forground, adding an alloc before the execio.

Results:
Code:

IN BENCHIO - LMGET EXECIO
LMGET ELAPSED TIME - 8.367988 47298
EXECIO ELAPSED TIME - 0.285204 47298
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Oct 14, 2010 7:01 pm
Reply with quote

Another useless piece of information.

In my Production REXX code:
Execio is used 1300+ times
Lmget is used 2 times (I do not remember why I chose to do it that way)
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Oct 14, 2010 7:18 pm
Reply with quote

EXECIO is a REXX function.

LM..... is an ISPF SERVICE.

can use LM... in REXX, COBOL, CLIST, PL1

can only use EXECIO in REXX

i personally
  • use EXECIO for small files and single pds member processing
  • for large records/large files I use LM... in REXX, and for multiple PDS member processing in REXX,COBOL
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Oct 15, 2010 1:27 am
Reply with quote

Quote:
can use LM... in REXX, COBOL, CLIST, PL1

Good point. I suspect the performance of LM services will be much better in compiled languages than when called in rexx.
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Fri Oct 15, 2010 7:24 am
Reply with quote

dbzTHEdinosauer wrote:
EXECIO is a REXX function.

LM..... is an ISPF SERVICE.

can use LM... in REXX, COBOL, CLIST, PL1

can only use EXECIO in REXX

i personally
  • use EXECIO for small files and single pds member processing
  • for large records/large files I use LM... in REXX, and for multiple PDS member processing in REXX,COBOL


oh, yes ! EXECIO can not process multi-member PDS.
I like your answer and this forum !
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Fri Oct 15, 2010 7:26 am
Reply with quote

daveporcelan wrote:
Yes it was run in the background.

For the execio process, the file was allocated in the jcl.

For the lmget, I used lminit, lmopen, lmget(in loop).

I did run this again in the forground, adding an alloc before the execio.

Results:
Code:

IN BENCHIO - LMGET EXECIO
LMGET ELAPSED TIME - 8.367988 47298
EXECIO ELAPSED TIME - 0.285204 47298


Thanks for your testing , it seems that if I don't compile , EXECIO is more fast than LM...
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts What is the difference between Taskty... Compuware & Other Tools 2
No new posts Difference between VALIDPROC and CHEC... DB2 3
No new posts Difference between CEE3250C and CEE3204S COBOL Programming 2
Search our Forums:

Back to Top