Initialises the list of datasets for a criterion:
"ISPEXEC LMDINIT LISTID(IDVAR) LEVEL("LEVELVAR")"
Where IDVAR is a variable to be used by the system to assign a name to the list initialised. LEVELVAR is a variable which holds the selection criteria. Ex: NFSK00.ABC*.KQLFR
Retrieve the list initialised:
"ISPEXEC LMDLIST LISTID("IDVAR") OPTION(LIST) DATASET(DSVAR)"
Where DSVAR is a variable which holds the current dataset in the list
After retrieving the ID variable IDVAR has to be freed:
"ISPEXEC LMDLIST LISTID("IDVAR") OPTION(FREE)"
If the ID variable is used so many times, say in a loop, it is advisable to initialise the variables IDVAR and DSVAR.
DROP IDVAR
DROP DSVAR
Tuesday, July 21, 2009
REXX builtin function - WORDPOS
Returns the word position in a given string
WORDPOS(srch-str, str-srched,)
where
srch-str -> String to be searched
Str-srched -> String in which srch-str is searched for
Start pos -> start of search. This is optional and by default it is 0 i.e beginning of str-srched
Example:
WORDPOS('dog', 'barking dogs seldom bite')
--returns 2
WORDPOS('tide', 'time waits for none')
--returns 0
WORDPOS('be', 'To be or not to be',3)
--returns 6 since the search starts at 3rd word 'or'
WORDPOS(srch-str, str-srched,
where
srch-str -> String to be searched
Str-srched -> String in which srch-str is searched for
Start pos -> start of search. This is optional and by default it is 0 i.e beginning of str-srched
Example:
WORDPOS('dog', 'barking dogs seldom bite')
--returns 2
WORDPOS('tide', 'time waits for none')
--returns 0
WORDPOS('be', 'To be or not to be',3)
--returns 6 since the search starts at 3rd word 'or'
Thursday, November 06, 2008
Error message in IDCAMS step
1IDCAMS SYSTEM SERVICES 0 REPRO IFILE(INPUT) OFILE(OUTPUT) 0IDC3302I ACTION ERROR ON NWPOT010.IPS.OBGS709.CBS.CUR.G0002V00 IDC3321I ** OPEN/CLOSE/EOV ABEND EXIT TAKEN IDC31467I MAXIMUM ERROR LIMIT REACHED. 0IDC0005I NUMBER OF RECORDS PROCESSED WAS 716 0IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12
Cause:
In the input file, base gdg was given. Of the GDG generations, 1st generation was of wrong LRECL. Hence, error occurred at 2nd generation.
Thursday, August 14, 2008
PLI- %REPLACE
The %REPLACE statement allows you to program with named constants.
The %REPLACE statement has the form:
%REPLACE identifier BY constant;
Ex:
%REPLACE MAX BY 100;
The compiler replaces every occurrence of the given identifier in
the source text with the specified constant. The constant can be a
signed or unsigned arithmetic constant, a bit string, or a character
The %REPLACE statement has the form:
%REPLACE identifier BY constant;
Ex:
%REPLACE MAX BY 100;
The compiler replaces every occurrence of the given identifier in
the source text with the specified constant. The constant can be a
signed or unsigned arithmetic constant, a bit string, or a character
Thursday, August 07, 2008
PLI - ONCODE built in function
The ONCODE built-in function provides a fixed-point binary value that depends on the cause of the last condition. If ONCODE is used out of context, zero is returned.
Syntax:
var=ONCODE ()
Syntax:
var=ONCODE ()
Thursday, January 24, 2008
What is CATMAINT utility
The CATMAINT utility updates DB2 catalog tables. This is generally run during migration. This utility can run only by the user who holds installtion SYSADM authority.
Subscribe to:
Posts (Atom)