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
 

 

difference between EXECIO and LMGET/PUT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: difference between EXECIO and LMGET/PUT
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

Senior Member


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

PostPosted: Thu Oct 14, 2010 8:43 am    Post subject: Reply to: difference between EXECIO and LMGET/PUT
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    Post subject: Re: Reply to: difference between EXECIO and LMGET/PUT
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: 645
Location: Pennsylvania

PostPosted: Thu Oct 14, 2010 6:27 pm    Post subject:
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    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Thu Oct 14, 2010 6:55 pm    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Thu Oct 14, 2010 7:01 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Fri Oct 15, 2010 1:27 am    Post subject: Reply to: difference between EXECIO and LMGET/PUT
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts why i need hit enter after EXECIO * D... jackzhang75 CLIST & REXX 10 Fri May 20, 2016 9:16 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts Difference Between CICS WebSupport an... sachinji84 CICS 1 Mon Mar 07, 2016 7:25 pm
No new posts Difference between -180 and -181 with... deepak_shrivastava DB2 4 Wed Jan 06, 2016 10:00 am


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