View previous topic :: View next topic |
Author |
Message |
javedsk12 Beginner
Joined: 14 Dec 2007 Posts: 66 Topics: 36 Location: pune
|
Posted: Fri Dec 28, 2007 2:38 am Post subject: Not getting the values of the Parm parameter |
|
|
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 |
|
|
vkphani Intermediate
Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
|
Back to top |
|
|
Arunprasad.K Beginner
Joined: 18 Jan 2006 Posts: 18 Topics: 5 Location: Chennai, India
|
Posted: Fri Dec 28, 2007 3:41 am Post subject: |
|
|
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 |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Fri Dec 28, 2007 5:10 am Post subject: |
|
|
You could try adding a comma:
//step1 exec pgm=cobpro,parm=123456 _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Fri Dec 28, 2007 3:43 pm Post subject: |
|
|
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 |
|
|
javedsk12 Beginner
Joined: 14 Dec 2007 Posts: 66 Topics: 36 Location: pune
|
Posted: Sat Dec 29, 2007 3:58 am Post subject: Parm parameter |
|
|
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 _________________ javed
-----------------------
The Word Impossible it self says i am possible(im possible) |
|
Back to top |
|
|
javedsk12 Beginner
Joined: 14 Dec 2007 Posts: 66 Topics: 36 Location: pune
|
Posted: Sat Dec 29, 2007 4:55 am Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Sat Dec 29, 2007 9:40 am Post subject: |
|
|
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 |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Mon Dec 31, 2007 10:13 am Post subject: |
|
|
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 |
|
|
javedsk12 Beginner
Joined: 14 Dec 2007 Posts: 66 Topics: 36 Location: pune
|
Posted: Fri Jan 04, 2008 6:29 am Post subject: parm |
|
|
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 |
|
|
Bill Dennis Advanced
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Fri Jan 04, 2008 8:58 am Post subject: |
|
|
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 |
|
|
javedsk12 Beginner
Joined: 14 Dec 2007 Posts: 66 Topics: 36 Location: pune
|
Posted: Thu Feb 07, 2008 4:20 am Post subject: |
|
|
bill,
tried the another way by putting the parm parameter at run time still not working
javed _________________ javed
-----------------------
The Word Impossible it self says i am possible(im possible) |
|
Back to top |
|
|
Bill Dennis Advanced
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Thu Feb 07, 2008 9:06 am Post subject: |
|
|
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 |
|
|
|
|