Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Pass value to embeded DB2 prgm using PARM?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Pass value to embeded DB2 prgm using PARM?
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: 2360
Location: Israel

PostPosted: Wed Dec 20, 2006 6:22 pm    Post subject:
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    Post subject: Re: Pass value to embeded DB2 prgm using PARM?
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    Post subject: Re: Pass value to embeded DB2 prgm using PARM?
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts Copy a particular column based on PAR... brindhamohan DFSORT/ICETOOL 5 Wed May 11, 2016 8:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us