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

To execute REXX faster


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

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Thu Jul 24, 2008 5:15 pm
Reply with quote

I've created a rexx routine to format an input file and the input file have 300,000 records so make not able to excute all at once
if so it gives me error message as "Machine storage exceeded"

So I split it into 50,000 records each and trying to format it, but this takes me lot of time to save more than half an hour and even more to complete
is there any way that I can make it faster.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jul 24, 2008 5:17 pm
Reply with quote

Use something other than REXX.
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Thu Jul 24, 2008 5:20 pm
Reply with quote

but i have created the REXX for this will not be able to change now.

so any other possibility in REXX?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 24, 2008 5:32 pm
Reply with quote

What do you mean reformat the input file ?
Just selecting various fields from the file ? Please give more details.
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Thu Jul 24, 2008 5:48 pm
Reply with quote

i will have a copybook
A PIC x(10)
B PIC X(5)
my inout file will be
123%rf%
1234%refgg%
so i need to format this input file for the length specified in the copybook
and the output will be like

123 rf
1234 refgg

i did the rexx for this and its working fine my concerns is if i give more than 50000 records and try executing it online its taking more than a hour so is there any way to execute this fast
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Thu Jul 24, 2008 5:52 pm
Reply with quote

Rexx is not very good for I/O,- I mean is very bad - but in any case execute that program in batch mode, execept you want to drink coffees and coffees in front of your SYSTEM screen.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 24, 2008 6:06 pm
Reply with quote

PeD wrote:
execept you want to drink coffees and coffees in front of your SYSTEM screen.


Yes, batch is another option.

Hey Pierre, c'est que tu fais tous les temps ? moi aussi icon_biggrin.gif
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Thu Jul 24, 2008 6:19 pm
Reply with quote

No Martin.

Coffee machine is out of order !! and no more biscuits !!!!

Where are you?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 24, 2008 6:31 pm
Reply with quote

PeD, have messaged you offline.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 24, 2008 6:33 pm
Reply with quote

vidyaa, I think the consensus is that if you're concerned about performance, REXX is not the way to go. If you're forced to stick with REXX, be prepared to wait for the processing to complete.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Jul 25, 2008 4:24 am
Reply with quote

if rexx is your only media,
swap the execio logic for allocate, get, put, (or whatever the read is) etc.....
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Jul 25, 2008 4:30 am
Reply with quote

you want a process that is not restricted to file size.

So, read them one at a time,
the execio when you start reading mannnny records
(like this silliness that you have)
ends up spending a lot of time finding memory to hog from other services.
With the allocate you can control how much 'buffer' is being used.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Jul 25, 2008 8:25 am
Reply with quote

I'm curious, does anyone know? Would the file I/O times be better if you were to use the ISPF LMGET/LMPUT services instead of EXECIO?
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Fri Jul 25, 2008 12:00 pm
Reply with quote

Can any one please tell me how to execute this in the batch mode. i have 2 macro involved in the REXX

am using the below JCL but that gives me some abend like S322
Code:

//REXXRUN JOB (8200,4190),'REXXJCL', 
//  NOTIFY=&SYSUID,MSGCLASS=J,CLASS=A
//TSOBATCH EXEC PGM=IKJEFT01,DYNAMNBR=200         
//SYSEXEC DD DSN=NE0123.REXX.EXEC,DISP=SHR     
//SYSPRINT DD SYSOUT=*                           
//SYSTSPRT DD SYSOUT=*                           
//SYSTSIN DD *                                   
  PROFILE PREFIX(NE0123)                         
  %FORMAT2
Back to top
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 194
Location: India

PostPosted: Fri Jul 25, 2008 12:10 pm
Reply with quote

might help..

Add, Region, Time parms in your job card

just from quick reference...

322

Explanation: One of the following occurred:

o The system took a longer time to run a job, job step, or procedure
than the time specified in one of the following:

- The TIME parameter of the EXEC or JOB statement

- The standard time limit specified in the job entry subsystem

o For a started task under the master subsystem, the TIME parameter was
not specified on the PROC statement of the catalogued procedure, and
the PPT entry did not indicate a system task
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 25, 2008 12:19 pm
Reply with quote

I would speak to your peers and see which job classes allow more CPU resource.

And if possible - perform some check to verify that the step is not looping before attempting to add TIME parameters in the JCL.
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Fri Jul 25, 2008 12:21 pm
Reply with quote

yes ..let me try that
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri Jul 25, 2008 1:14 pm
Reply with quote

Just spotted this thread....

Curious - the files looks to me like a .CSV type file, delimited by percent signs?

DFSORT using PARSE and JFY might be the way to go....

www-304.ibm.com/systems/support/storage/software/sort/mvs/tricks/pdf/sorttrck.pdf

Garry.
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Fri Jul 25, 2008 2:11 pm
Reply with quote

yes the input is delimted by % . am parsing those variables read the copybook to find the length of the varibale and if the length is same as specified in the copybook then writing it as it is else pad the difference in the length of the field and the copybook and fill it the remaining length with spaces and write to the output file.

my concerns is this runs fine online when i try with 50 to 100 records but am not able to run the same for 50,000 recordds and more. i tried with both online and batch it is taking hours and hours so wanted to make it fast
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri Jul 25, 2008 2:37 pm
Reply with quote

Try the following DFSORT batch job, I believe it will do what you want much more efficiently than REXX, and it's probably easier to maintain.

I assumed padding on the right for both fields (JUSTIFY=LEFT). You could alternatively specify JUSTIFY=RIGHT

Code:
//STEP01   EXEC PGM=ICEMAN                                 
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD *                                           
123%rf%                                                   
1234%refgg%                                               
//SORTOUT  DD SYSOUT=*                                     
//SYSIN    DD *                                           
*                                                         
 OPTION COPY                                               
 INREC PARSE=(%01=(ENDBEFR=C'%',FIXLEN=10),               
              %02=(ENDBEFR=C'%',FIXLEN=5)),               
       BUILD=(%01,JFY=(SHIFT=LEFT),                       
              %02,JFY=(SHIFT=LEFT))                       
*                                                         


Regards,
Garry.
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Fri Jul 25, 2008 3:16 pm
Reply with quote

am getting S000 U0016 on running this please advice also i have 3lakhs records like 123|~rf|~ etc.(actually its a |~ seperator not %) then how do i run this and get this formated into an output file
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 25, 2008 3:18 pm
Reply with quote

Post the output showing the error
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Fri Jul 25, 2008 3:23 pm
Reply with quote

I ran the same jcl what is posted above The erro messaage
05.51.53 J0008571 NE1034RN ENDED AT HTF1 - ABENDED S000 U0016 CN(INTER
AL)
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 25, 2008 3:25 pm
Reply with quote

Aaaaaaaaah, Garry give you syntax for DFSORT, you execute SYNCSORT
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Fri Jul 25, 2008 3:27 pm
Reply with quote

//STEP01 EXEC PGM=ICEMAN is what i used .
am not getting what is to be done on this regard
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top