MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Not getting the values of the Parm parameter

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
javedsk12
Beginner


Joined: 14 Dec 2007
Posts: 66
Topics: 36
Location: pune

PostPosted: Fri Dec 28, 2007 2:38 am    Post subject: Not getting the values of the Parm parameter Reply with quote

hi friends,

i am accepting the values through the parm parameter and while doing that the program got compiled and executed successfully but didn't shown any outputs please help.....

jcl:

//step1 exec pgm=cobpro parm=123456

Cobol:

linkage section
01 par1
02 par1-len pic s9(4).
02 par1-data pic x(100).
procedure division using par1.
accept par1.
display par1.

_________________
javed

-----------------------
The Word Impossible it self says i am possible(im possible)
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Dec 28, 2007 2:45 am    Post subject: Reply with quote

javed,

Check the below link.

http://www.mvsforums.com/helpboards/viewtopic.php?t=1581&highlight=parm
Back to top
View user's profile Send private message Send e-mail
Arunprasad.K
Beginner


Joined: 18 Jan 2006
Posts: 18
Topics: 5
Location: Chennai, India

PostPosted: Fri Dec 28, 2007 3:41 am    Post subject: Reply with quote

javedsk12,

You do NOT have to have an accept statement. Remove the accept statement and run the program, it should display the correct value.

Your accept statement tries to get the input from SYSIN which I guess is not there in your JCL.

Arun.
Back to top
View user's profile Send private message Send e-mail
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Fri Dec 28, 2007 5:10 am    Post subject: Reply with quote

You could try adding a comma:

//step1 exec pgm=cobpro,parm=123456
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Fri Dec 28, 2007 3:43 pm    Post subject: Reply with quote

As Mervyn indicates, your "parm=123456" phrase is considered a comment because the space following the program name terminated the EXEC statement. Please see JCL manual.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
javedsk12
Beginner


Joined: 14 Dec 2007
Posts: 66
Topics: 36
Location: pune

PostPosted: Sat Dec 29, 2007 3:58 am    Post subject: Parm parameter Reply with quote

mervyn

if i am putting an comma to separate the parm parameter from step so it is giving maxcc=8 if i am omitting the comma then running fine and we need to accept the values which are in linkage section to use them in procedre division.


javed Very Happy
_________________
javed

-----------------------
The Word Impossible it self says i am possible(im possible)
Back to top
View user's profile Send private message
javedsk12
Beginner


Joined: 14 Dec 2007
Posts: 66
Topics: 36
Location: pune

PostPosted: Sat Dec 29, 2007 4:55 am    Post subject: Reply with quote

getting the s000u4038 for the same parameter program should i need to pass it at compile or run time.

if went to spool show the message:

the open of display or accept file with env name sysin was unsuccessful from compile unit parm1(name of variable) at entry point parm1 at compile unit offest +00000248 at address 000081c0

_________________
javed

-----------------------
The Word Impossible it self says i am possible(im possible)
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat Dec 29, 2007 6:37 am    Post subject: Reply with quote

see the post above by Arunprasad.K
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Sat Dec 29, 2007 9:40 am    Post subject: Reply with quote

If you decide to use the LINKAGE SECTION to read your parameter, then PAR1-LEN must be defined with a usage of BINARY or COMP-5, not DISPLAY. Before referring to PAR1-DATA, check the value of PAR1-LEN. All of this is in the JCL manual and language reference manual.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Mon Dec 31, 2007 10:13 am    Post subject: Reply with quote

This works fine for us. There is no ACCEPT in the program:

Code:

     .  014100  LINKAGE SECTION.                                                          .     
     .  014200 *                                                                          .     
     .  014300  01  INPUT-REQUEST.                                                        .     
     .  014400      05 INPUT-LENGTH     PIC S9(4) COMP.                                   .     
     .  014500      05 WORK-ORDER-TYPE  PIC  X(1).                                        .     
     .  014600        88 ACTIVE-WORK-ORDER VALUE 'Y'.                                     .     
     .  014700        88 INACTIVE-WORK-ORDER VALUE 'N'.                                   .     
     .  014800 /                                                                          .     
     .  - - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -   41 Line(s) not Displayed  .     
     .  019100      IF  ACTIVE-WORK-ORDER                                                 .     
     .  019200        MOVE '  ACTIVE' TO WS-HEAD-ACTIVE                                   .     
     .  019300      ELSE                                                                  .     
     .  019400        MOVE 'INACTIVE' TO WS-HEAD-ACTIVE                                   .     
     .  019500      END-IF                                                                .     
     .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   .     
  .    File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help                     . 
  .  sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss . 
  .  EDIT       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                           Columns 00001 00080  . 
  .  Command ===>                                                          Scroll ===> CSR   . 
  .  000033 //***  PRINT ACTIVE\INACTIVE DETAILS ***                                         . 
  .  000034 //STEP03   EXEC PGM=CCFACTPR,PARM=Y                                              . 

_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
javedsk12
Beginner


Joined: 14 Dec 2007
Posts: 66
Topics: 36
Location: pune

PostPosted: Fri Jan 04, 2008 6:29 am    Post subject: parm Reply with quote

this is my compile jcl

//ISAM21SS JOB NOTIFY=&SYSUID
//LIB JCLLIB ORDER=ISAM21.AAA.PDS
//STEP EXEC PROC=IGYWCL PARM=12345
//COBOL.SYSIN DD DSN=ISAM21.AAA.PDS(TEST1),DISP=SHR
//LKED.SYSLMOD DD DSN=ISAM21.AAA.LOADPDS(TEST1),DISP=SHR


cobol program:

IDENTIFICATION DIVISION.
PROGRAM-ID. CH03EX03.
ENVIRONMENT DIVISION.
DATA DIVISION.
LINKAGE SECTION.
01 PARM.
02 DATA-LEN PIC S9(4) COMP-4.
02 DATA1 PIC X(100).
PROCEDURE DIVISION USING PARM.
DISPLAY PARM.
STOP RUN.


previously i was using the accept st but this one too is not working

_________________
javed

-----------------------
The Word Impossible it self says i am possible(im possible)
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Fri Jan 04, 2008 8:58 am    Post subject: Reply with quote

javed,

the PARM does not belong in the compile JCL (proc=IGYWCL). put it on the step when you execute your compiled program.

//ST1 EXEC PGM=TEST1,PARM=123456
//STEPLIB DD DSN=ISAM21.AAA.LOADPDS,DISP=SHR
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
javedsk12
Beginner


Joined: 14 Dec 2007
Posts: 66
Topics: 36
Location: pune

PostPosted: Thu Feb 07, 2008 4:20 am    Post subject: Reply with quote

bill,

tried the another way by putting the parm parameter at run time still not working


javed bonk
_________________
javed

-----------------------
The Word Impossible it self says i am possible(im possible)
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Thu Feb 07, 2008 9:06 am    Post subject: Reply with quote

Can you post your JCL?
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group