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
 

 

Passing Value Through Parm Parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Thu Jan 15, 2009 3:38 pm    Post subject: Passing Value Through Parm Parameter
Reply with quote

Hi,

can any one let me know if i am passing a value through Parm and not accepting it in my cobol program will it give me error. If yes what error it will give i mean the error code.

regards,
rupesh gupta
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jan 15, 2009 3:39 pm    Post subject:
Reply with quote

Why not try it and see for yourself.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Jan 15, 2009 3:42 pm    Post subject:
Reply with quote

Hi,

if PARM is not defined in the program then it will just be ignored.


Gerry
Back to top
View user's profile Send private message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Thu Jan 15, 2009 4:15 pm    Post subject: Reply to: Passing Value Through Parm Parameter
Reply with quote

Gerry,

it didn't gave me any error. I gave exec pgm=RGAUNDR,Parm='rupesh'

and submitted th jcl ot gave no error
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Thu Jan 15, 2009 4:20 pm    Post subject:
Reply with quote

Yes, it won't throw any error!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jan 15, 2009 9:11 pm    Post subject:
Reply with quote

Hello,

If the code is not set up to use the parm, suggest it be removed from the jcl. . .

At best, this will cause someone confusion someday. . . icon_sad.gif
Back to top
View user's profile Send private message
prashanth1

New User


Joined: 27 Sep 2006
Posts: 47
Location: Hyderabad

PostPosted: Fri Jan 16, 2009 11:26 am    Post subject:
Reply with quote

Rupesh,

Have U declared Linkage section in cobol program with length and actual parameter ?
Back to top
View user's profile Send private message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Fri Jan 16, 2009 11:29 am    Post subject: Reply to: Passing Value Through Parm Parameter
Reply with quote

hi Prashanth 1,

no i didnt declare linkage in program . I just wanted to see will jcl give any error if i dont give linkage.

rupesh
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Fri Jan 16, 2009 5:33 pm    Post subject:
Reply with quote

program will run sucessfully....but the data through the parm will not be available for the source program..
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Sat Jan 17, 2009 1:12 pm    Post subject:
Reply with quote

Hi,

This is like asking "if I code a DD startement in JCL executing my program but that program doesn't do any processing on that DD - what'll happen ?" - well, I would say this is nothing but bad coding practices & we must avoid such thing unless it's for learning purpose.

JCL, as been stated many times on this board, does nothing itself and merely executes programs - but then it needs all the information your program needs for a successful execution.

Your JCL is sending some information via PARM but program is just not bothered about it because nothing was told to it by the programmer so this question
Quote:
.. wanted to see will jcl give any error if i dont give linkage.
is actually ruled out; scope of "Linkage Section" is limited to your COBOL code unless it's been made aware that it might get some thing from "PARM"..
Back to top
View user's profile Send private message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Mon Jan 19, 2009 2:32 pm    Post subject: Reply to: Passing Value Through Parm Parameter
Reply with quote

Hi Anuj,

I had just created that jcl for testing purpose...

I have one more doubt regading passing values through parm.

say i want to pass 1,2,3 to three variables .code is as shown:

exec pgm-test,parm= '1,2,3'

and in cobol i have linkage as shown:
linkage-section.

01 ws-variable.
49 ws-length pic x(4) comp.
49 ws-var1 pic x(1).
49 ws-var2 pic x(2).
49 ws-var3 pic x(1).

procedure division using ws-var2 ws-var1 ws-var3 or
procedure division using ws-var1 ws-var2 ws-var3

which one of these two procedure divisions will receive values and what will be the values received in variables.

regards,
rupesh
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Jan 19, 2009 3:52 pm    Post subject:
Reply with quote

Hi Rupesh,

Did ypu try the above at your end, what happened ?
Back to top
View user's profile Send private message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Mon Jan 19, 2009 7:19 pm    Post subject: Reply to: Passing Value Through Parm Parameter
Reply with quote

hi anuj,

i tried with folowing syntax:

exec pgm=test,parm='123'

and in cobol i gave

linkage section.
01 ws-var.
05 ws-length pic s9(4) comp.
05 ws-var1 pic x(3).

it gave me ws-var as 123.

for that sntax which i asked you it gave me error as shown:
A "PICTURE" clause was not found for elementary item "WS-PARMLENGTH". "PIC

Operand "WS-VAR1 (ALPHANUMERIC)" was not defined as a level-01 or level-77

Operand "WS-VAR2 (ALPHANUMERIC)" was not defined as a level-01 or level-77

Operand "WS-VAR3 (ALPHANUMERIC)" was not defined as a level-01 or level-77

what i think i that u cannot get values in different variable. u will get value only of group variable in above case ws-var.

if you want to get value to var1 var 2 .. u have to move it one by one
let me know what i am saying is correct or not
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm


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