RC 84 in mainframe.

RC 84 - Check if the file is in close disable state.
Open enable the file in order to resolve the abend.

AEI0 abend in CICS

AEI0 abend in CICS
This abend occurs during CICS LINK execution due to wrong input parameter for link.
E.g. AEI0 abend with PGMIDERR
This indicates wrong program id/name.

S04E abend during DB2 load replace.

S04E abend during DB2 load replace.

S04E abend will occur during load replace if the db2 resource is not available.

Solution - If the job to load replace abends with S04E then make sure that the resource is available.
Resubmit the job once the resource is available.


DB2 SQLCODE -305

Mainframe db2 SQLCODE -305

Null indicator is missing in given SQL query. Given query is returning a NULL value.

Solution :- Handle the null indicator while retrieving the data using SQL query.

AD2U abend in CICS. THREADERROR 906

AD2U abend in CICS OR THREADERROR 906

AD2U abend occurs when DB2 thread creation fails.

Resolution:-
Check the SQLCODE associated with the abend.
THREADERROR 906 is the common SQLCODE with AD2U. Application may return the different SQLCODE,
SQLCODE 922 indicates the authorization error - i.e. given user does't have authorization on given plan in given region.

So verify your plan, its access and also verify the RCT entries for application's transaction for given plan.

What is -818 SQLCODE & how to resolve it?

-818 SQLCODE

Time-stamp mismatch between PLAN and load module.
Solution - Rebind the given component.

-911 SQLCODE

-911 SQLCODE

Deadlock.
Given task will go in deadlock, when resource is not available for long time.

-904 SQLCODE

-904 SQLCODE

Resource not available.
db2 SQL query will throw this error while db2 resource is not available.
Solution - Delay the given query and retry for the operation.

-803 SQLCODE

-803 SQLCODE

Duplicate record while INSERT.
db2 SQL query will throw this error while inserting duplicate record into db2 table.

How to resolve -805 SQLCODE in db2?

How to resolve -805 SQLCODE in db2?

This sqlcode code indicates than DBRM not found. DBRM/package not found in given Plan
Solution - Bind the corresponding component.

S878 abend in JCL.

S878 abend in JCL.

Cause - This abend occurs due to not enough virtual private storage space available.
Solution - Increas the region space in job card.

ASRA abend in CICS program.

*What is ASRA abend in CICS program?

ASRA abend - This abend occurs due to program interruption.

*How to resolve ASRA abend in CICS program?

Most of the time this abend occurs due to SOC7 conditions, where non numeric value is moved in numeric variable.

SqlCode 92J in db2 cobol program.

SqlCode 92J in db2 cobol program.

-92J - authorization failure with DB2 connection.
In order to resolve this issue, given userid should have access to given db2 Plan under given db2 schema.

String handling in REXX program.

String handling in REXX.

In REXX programs, we can handle the string using inbuilt functions

1) LENGTH - It gives the length of given string.
Sample Program -

/*REXX*/
A = 'REXX'
B = LENGTH(A)
SAY 'Length of A is =' B

Console output -
Length of A is =4

2) WORD - It gives the number of words in the given string.
Sample Program -

/*REXX*/

X = 'Use of  String function in REXX'
Y = LENGTH(X)
SAY 'No of words in X are =' Y

Console output -
'No of words in X are =6

Use of switching logic in REXX program.

Use of switching logic in REXX program.

In REXX program, we can add switch logic in order perform respective task.

Sample Program -

/*REXX*/
SAY 'Your Marks'
PULL A
SELECT
  WHEN A < 40
     SAY 'You are FAIL' 
  WHEN A > 40
     SAY 'You are PASS'
  OTHERWISE
     SAY 'Please enter the correct marks'
END

SELECT - It works like SWITCH.

Output Console -
50
You are PASS



How to use loop in REXX program?

How to use loop in REXX program?

In REXX programs, we can add the logic for loops with the help of DO statement.

Sample Program -

Use of IF ELSE statement in REXX.

Use of IF-ELSE statement in REXX.

Lets see how to use the IF-ELSE statement in REXX,

/*REXX*/
A = 10
B = 12
IF A > B THEN
    SAY 'A is greater than B'
ELSE
    SAY 'B is greater than A'

How to execute REXX program in mainframe?

How to execute REXX program in mainframe?

REXX program can be executed by two way,

1) EX command -
Use the command "EX" in front of the member of PDS having REXX program.

2) TSO "<REXX_PROGRAM_NAME>" -
In order to run the REXX program like TSO utility/command,
    i) Add your REXX program member to CLIST dataset
    (In many this library is "<your_id>.A.CLIST")
    ii) Then us the command TSO "<program_name>"


Sample REXX program to add two variables.

Sample REXX program to add two variables.

Lets see how to write a sample program which will do addition of two variables.
In this example input will be given by user dynamically and output (addition) will be displayed on concole.

/*REXX*/
SAY 'Input variable 1='
PULL a

SAY 'Input variable 2='
PULL b
c= a + b
SAY 'Addition is = ' c

PULL - Its like scanf in "C".

Console after program execution -
Input variable 1=
5

Input variable 2=
6
Addition is = 11





REXX

REXX - Restructured Extended Executor.

REXX is a structured, high level programming language and it was designed by "Mike Cowlishaw" (IBM).

Sample REXX Program -

///*REXX*/
//SAY 'Welcome to REXX world!'

SAY - It is used to print the string on console. Its like DISPLAY in cobol.


What is IEFBR14?

What is IEFBR14?

IEFBR14 is a null program. It's purpose is do nothing, just ext a program or a procedure.
It's used for syntax check of JCL since it does nothing.

Use of IEFBR14 -

//MYJOB   JOB  (,,,)
//STEP_1  EXEC PGM=IEFBR14
..
..

How to override a step of cataloged procedure from JCL?

How to override a step of cataloged procedure from JCL?

//MYJOB   JOB  (,,)
.
.
//MYPROC   EXEC  PROC_NAME
.
.
//STEP_NAME.DDNAME

STEP_NAME = Name of a step from given cataloged proc PROC_NAME
DDNAME= DDNAME of given step STEP_NAME.

How to restart a job from particular step in JCL?

How to restart a job from particular step in JCL?

Job can be restarted from particular step using below syntax,
Add below command in job card,

RESTART=STEP_NAME

STEP_NAME = Name of step from where you want to restart the job.

If you are using cataloged procedure in your job then the syntax will be as,

//MYJOB    JOB ("","",""),
//                RESTART=MYPROC.STEP_NAME
.
.
//MYPROC   PROC    PROC_NAME

In above example STEP_NAME is a name of step of a proc PROC_NAME

What is SB37 abend in JCL and how to resole SB37 abend?

SB37 abend in JCL

Whenever there is problem with volume of data set, it gives SB37 abend.
In order to resolve the SB37 abend, increase the size of dataset in JCL and restart the job.

How to browse list a program in mainframe?

How to browse list a program in mainframe?

1) Go to the package of given program
(If its not in package then checkout the program in your package)
2) Use a command BL in front of the required program.
3) Now browse listing will appear for given program.

How to get the values during SOC7 abend?

How to get the values during SOC7 abend?

1) Go to FA (fault analyzer)
2) Browse the respective abend entry.
3) Use the option 2 in order to view the exact location of abend.
4) Here it will ask for Browse List (BL) of programs associated with this abend.
(Give the program names and their browse list)
5) Now it will shoe the exact location of abend and the values during abend.

How to resolve SOC7/S0C7 abends?

How to resolve SOC7/S0C7 abends?

In order to resolve the SOC7 abend we can us the the fault analyzer (FA) as,
1) Go to FA and locate the address for abend.
2) Browse list (BL) the program for which abend occurred.
3) Find the given address in given browse list
(First find the HEXLOC as a refer point  in order to locate the address )
4) We will get the line number associated with the given address.
5) The statement associated with the above line number is the point where SOC7 occurred.
6) This will show the cause of SOC7 with respective variables..

S0C7/SOC7 abend.

S0C7/SOC7 abend.

S0C7 abend occurs due to bad data passed to a program variable.
i.e. non numeric data passes to numeric variable.