Tags

, , , , , , , , , , ,

We often run batch SPUFI requests to update/insert data into DB2 tables. Some times, some of the values that we need to insert/update can be more than 72 characters. In JCL, we cannot enter the data more than 72 characters, so below are different ways with which we can accomplish this.

1) Code your data till 72 byte and continue the next character at the first column in the next line

2) Update Table set col = ‘first 30 bytes data’;
Update Table set col = substr(col,1,30) || ‘second 30 bytes data’;
Update Table set col = substr(col,1,60) || ‘third 30 bytes data’;

3) Update table set col = ‘initial length’ ||
‘remaining length data’;

If your requirement is just to replace few chars (‘abc’ with ‘def’) in a string that is greater than 72 chars, then you could use just REPLACE option instead of mentioning the complete string

4) Update Table
Set col = replace(col,’abc’,’def’);

——————————————————————————————————–

If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog

——————————————————————————————————–

You may also like to look at:

Working on Mainframes – Is Change to a different technology necessary
Important SQL CODES and ABEND CODES
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
KNOW YOUR MAINFRAME
REXX – INITIAL SETUP
HOW TO SUBMIT A BATCH JOB FROM THE CICS PROGRAM
CICS – EXEC interface block – EIBRESP Values
CICS – EXEC interface block Fields
Flow of control between COBOL programs, run units, and CICS
CICS INTERVIEW QUESTIONS
CICS TIPS
COBOL – COPY and INCLUDE statements
COBOL – PERFORMANCE IMPROVEMENT
COBOL – SIGN STORED IN COMP, COMP-3 AND DISPLAY FORMATS
SHORTEST COBOL PROGRAM
RESTART LOGIC IN COBOL DB2 Program
GOBACK – EXIT PROGRAM – STOP RUN
Continuation lines in COBOL
Computational items – COMP, COMP 1 , COMP 2, COMP 3
COBOL program format
cobol indicator area column-7 and area a and area b
COBOL INTERVIEW QUESTIONS
COBOL TIPS
COBOL COMPILER OPTIONS
The IDENTIFICATION DIVISION
Advertisement