IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Pass value to embeded DB2 prgm using PARM?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ajishvijay
Warnings : 1

New User


Joined: 02 Aug 2006
Posts: 9

PostPosted: Wed Dec 20, 2006 4:29 pm
Reply with quote

hi all,
how can v pass values using PARM in DB2RUNjcl to an embeded DB2 prgm?

000100 ID DIVISION.
000200 PROGRAM-ID. ASD.
000300 DATA DIVISION.
000400 WORKING-STORAGE SECTION.
000500 EXEC SQL INCLUDE DCLGEN END-EXEC.
000600 EXEC SQL INCLUDE SQLCA END-EXEC.
000610 01 WS-TO PIC 9(4).
000620 01 WS-FROM PIC 9(4).
000630 01 WS-I PIC 9(4).
000700 LINKAGE SECTION.
000800 01 LS-A.
000900 02 LS-LEN PIC S9(4) COMP.
001000 02 LS-TO PIC X(4).
001100 02 LS-FROM PIC X(4).
001200 PROCEDURE DIVISION USING LS-A.
001300 MAIN-PARA.
001310 DISPLAY LS-TO.
001320 DISPLAY LS-FROM.
001400 MOVE LS-TO TO WS-TO.
001500 MOVE LS-FROM TO WS-FROM.
001600 PERFORM PROCESSPARA VARYING WS-I FROM WS-TO BY 1000
001700 UNTIL WS-I > WS-FROM.
001800 STOP RUN.
001900 PROCESSPARA.
001910 MOVE WS-I TO ENO.
002000 EXEC SQL SELECT ENO,ENAME,ECITY INTO
002100 :ENO,:ENAME,:ECITY FROM ESCUB01.EMPY1
002200 WHERE ENO = :ENO
002300 END-EXEC.
002400 DISPLAY "ENO" ENO.
002500 DISPLAY "ENAME" ENAME.
002600 DISPLAY "ECITY" ECITY.
****** **************************** Bottom of Data

This is the Embeded DB2 prgm. I want to pass value using PARM to this prgm. I mean thru DB2RUN. Following code not working.

000001 //ESCUB01C JOB NOTIFY=&SYSUID
000002 //JOBLIB DD DSN=DSN710.SDSNLOAD,DISP=SHR
000003 // DD DSN=CEE.SCEERUN,DISP=SHR
000004 //* JCLLIB ORDER=ESCUB01.JOHN.SOURCE
000005 //* S2 EXEC PROC1
000006 //EXECTSO EXEC PGM=IKJEFT01,DYNAMNBR=20,PARM='10006000'
000007 //SYSTSPRT DD SYSOUT=*
000008 //SYSPRINT DD SYSOUT=*
000009 //SYSUDUMP DD SYSOUT=*
000010 //SYSOUT DD SYSOUT=*
000011 //SYSTSIN DD *
000012 DSN SYSTEM(DSN2)
000013 RUN PROGRAM(Z1) PLAN(ESCUB01) -
000014 LIB('ESCUB01.JOHN.LOAD')
000015 END
000016 //
****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Dec 20, 2006 6:22 pm
Reply with quote

The RUN command has PARMS parameter, as you can see in the fine manual.

O.
Back to top
View user's profile Send private message
ajishvijay
Warnings : 1

New User


Joined: 02 Aug 2006
Posts: 9

PostPosted: Thu Dec 21, 2006 12:22 pm
Reply with quote

Thanks for the syntax. For the refference of others syntax is as follows





________________________________________________________________________
| |
| |
| >>__RUN__ _PROGRAM(program-name)__ _________________ _ ______________> |
| | |_PLAN(plan-name)_| | |
| |_CP__PLAN(plan-name)________________________| |
| |
| >__ _______________________ __ _________________________ ___________>< |
| |_LIBRARY(library-name)_| |_PARMS(parameter-string)_| |
| |
| |
|________________________________________________________________________|
Back to top
View user's profile Send private message
shanudarling
Warnings : 1

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Thu Dec 21, 2006 12:25 pm
Reply with quote

After precompile ur pgm, in bind-run jcl at run time u can pass the value using PARM...........

Run program(pgm-name) PLAN(plan-name)
library(x.y.loadlib) PARMS(10006000)

try this.........

Regards
-------------
shanu icon_razz.gif

"To Succeed do the best you can, where you are, with what you have."
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
Search our Forums:

Back to Top