Joined: 04 Mar 2005 Posts: 84 Location: In my tiny cubicle ...
Ayyappan wrote:
How can i alocate more storage?
You can't. Talk to your MVS/JES Systems Programmers. They have apparently set a storage limit that you have exceeded. I would recommend that you find another solution, as there are storage limits to how many stem variables you can create within an address space.
Is there any other way by which i can read and get the number of records in a file? If i open and see the file, it is taking more time. So I wanted to create a rexx tool which i can run in backround. But it is giving me this problem.
Joined: 04 Mar 2005 Posts: 84 Location: In my tiny cubicle ...
Normally, if you are using EXECIO to read a file of an unknown size, you read it one record at a time into the stack:
Code:
RECCNT = 0
DO FOREVER
"EXECIO 1 DISKR DDIN"
IF RC <> 0 THEN LEAVE
RECCNT = RECCNT + 1
END
"EXECIO 0 DISKR DDIN (FINIS"
SAY "NUMBER OF RECORDS IN THE INPUT FILE IS:" RECCNT
Optionally, you could, if you wish to use a stem variable, read the records in limited chunks (say a 1000 at a time), keeping the number of records read in an accumulator.
That being said, I'm sure that you're aware that I/O processsing using EXECIO is rather slow, and that EXECIO is not well suited for processing large amounts of data in a reasonable amount of time. For simply counting records, a utility such as DFSORT or ICETOOL does a much better job with much less overhead.
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
I think, but I can be wrong(and for this I'm sorry but I need an explanation), that using the ExecIO you will use a large quantity of storage machine because all the data that you process is loaded in a Stack.
To avoid this problem you can delete the Stack(DELSTACK) when you finish to use the data.
In practise I used Rexx to scan my entire application(300 disks) and I spent very amount of time but I succeed!
In a second time I compiled my rexx and the time was reduced to a six part of original.
To conclude my theory, if you use correctly the storage and if you compile your rexx you will able to do anything...
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
There are two mainly reason to compile a Rexx program:
1) the security of your source;
2) the high performance.
And to compile it there are several methods that depends on the address you are currently working.
In my experience I used mainly one compiler that's REXXCOMP available in your installation.
This module is executed from a proc that usually is REXXCL that's in your SYS1.PROCLIB or SYS1.USER.PROCLIB(do not modify)
When you open it you will find a member like this:
Code:
//******************************************************************
//*
//* REXXCL Compile and link edit a REXX program of OBJ type.
//*
//* Copyright:
//*
//* Licensed Materials - Property of IBM
//* 5695-013 IBM Compiler for SAA REXX/370, Release 3
//* (C) Copyright IBM Corp. 1991, 1994
//* All rights reserved.
//*
//* Change Activity:
//* 94-10-27 Release 3.0
//*
//******************************************************************
//*
//* Parameters:
//*
//* STUB Stub type: MVS, CPPL, CALLCMD, EFPL, CPPLEFPL.
//* Default: EFPL.
//*
//* OPTIONS Compilation options.
//* Default: XREF OBJECT NOCEXEC
//*
//* COMPDSN DSN of IBM Compiler for SAA REXX/370 load library.
//*
//* LIBDSN DSN of IBM Library for SAA REXX/370 load library.
//*
//* LIBXDSN DSN of IBM Library for SAA REXX/370 exec library.
//*
//* Required:
//*
//* REXX.SYSIN DDNAME, REXX program to be compiled and link
//* edited.
//*
//* Example:
//*
//* To compile MYREXX.EXEC(MYPROG) and to link edit the resulting
//* OBJECT output together with a stub suitable for invocation
//* of the program from a REXX EXEC with the CALL instruction or
//* via function invocation, and to keep the resulting load module
//* in MYREXX.LOAD(MYPROG), use the following invocation:
//*
//* //S1 EXEC REXXCL
//* //REXX.SYSIN DD DSN=MYREXX.EXEC(MYPROG),DISP=SHR
//* //LKED.SYSLMOD DD DSN=MYREXX.LOAD(MYPROG),DISP=SHR
//*
//******************************************************************
//*
//REXXCL PROC STUB=EFPL, Type of stub
// OPTIONS='XREF OBJECT NOCEXEC', REXX Compiler options
// COMPDSN='REXX.VxRxxx.SFANLMD', REXX Compiler loadlib
// LIBDSN='REXX.VxRxxx.SEAGLMD', REXX Library loadlib
// LIBXDSN='REXX.VxRxxx.SEAGCMD' REXX Library execlib
//*
//*-----------------------------------------------------------------
//* Compile REXX program.
//*-----------------------------------------------------------------
//*
//REXX EXEC PGM=REXXCOMP,PARM='&OPTIONS'
//STEPLIB DD DSN=&COMPDSN,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//*SYSIEXEC DD DUMMY
//*SYSDUMP DD DUMMY
//*SYSCEXEC DD DUMMY
//SYSPUNCH DD DSN=&&OBJECT,DISP=(MOD,PASS),UNIT=SYSDA,
// SPACE=(800,(800,100))
//*
//*-----------------------------------------------------------------
//* Prepare SYSLIN data set for subsequent link step.
//*-----------------------------------------------------------------
//*
//PLKED EXEC PGM=IRXJCL,PARM='REXXL &STUB',
// COND=(9,LT,REXX)
//*
//SYSEXEC DD DSN=&LIBXDSN,DISP=SHR
//SYSIN DD DSN=&&OBJECT,DISP=(OLD,DELETE)
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD DSN=&&SYSOUT,DISP=(MOD,PASS),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),
// SPACE=(800,(800,100))
//*
//*-----------------------------------------------------------------
//* Link together stub and program.
//*-----------------------------------------------------------------
//*
//LKED EXEC PGM=HEWL,PARM='LIST,AMODE=31,RMODE=ANY,RENT,MAP',
// COND=((9,LT,REXX),(0,NE,PLKED))
//*
//SYSLIN DD DSN=&&SYSOUT,DISP=(OLD,DELETE)
//SYSLIB DD DSN=&LIBDSN,DISP=SHR
//SYSUT1 DD UNIT=SYSDA,SPACE=(1024,(200,20))
//SYSPRINT DD SYSOUT=*
//SYSLMOD DD DSN=&&GOSET(GO),DISP=(MOD,PASS),UNIT=SYSDA,
// SPACE=(1024,(50,20,1))
If you find this you have a compiler(is a default except for the name of the library).
I don't want to specify every statements so I assume that you have the right knowledge.
After this you must specify, as explained, in the comment of the proc the correct STUB you want to use, the source and the final loadlib.
I want to specify that there are some restriction for the different stub you want to use, and to have an idea of this I suggest you to read the Rexx manual.
Joined: 03 Jan 2006 Posts: 13 Location: Bangalore india
Hi MGIndaco,
I do have the above JCL but when i run it, it says REXXCOMP not found. I tried to find this program in various libraries but not able to. Does it reside in some particular library?
Also, I dont have any STEPLIB defined in REXXCC jcl under step 'compile REXX program'. Is this system defined or user defined?