how can u pass the values into db2 values from cobol ?

Answer Posted / uday

In your Execution jcl

//JOB1 JOB NOTIFY=&SYSUID
//STEP1 EXEC PGM=IKJEFT01
//STEPLIB DD DSN=PSHRPD.PROD.LOADLIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB2X)
RUN PROGRAM(PXXXXXXX) PLAN(DB2XXXXX) PARM('1234')
END
/*

In your Program = PXXXXXXX

Linkage section.

01 LK-PARM.
05 LK-LEN PIC S9(04) COMP.
05 LK-DATA PIC X(04).

PROCEDURE DIVISION USING LK-PARM.

So through Parm data also you can pass the data.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is s000 u4087 error? please give the all error codes in cobol,jcl.

17046


What are various search techniques in cobol? Explain.

650


Define static linking and dynamic linking.

669


How many bytes S(8) comp field occupy and its maximum value?

1634


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5065






What is redefines clause in COBOL?

851


What is a scope terminator give example?

657


IF I mention stop run in CICS what happens?

1896


What is the compute verb? How is it used?

661


i want a program using by if, evaluate , string, unstring, perform, occurs?

4061


How you can characterize tables in cobol?

718


how do you reference the rrds file formats from cobol programs

800


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2337


What are all the divisions of a COBOL program?

665


How do define dynamic array in cobol.

671