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

Parm values are not correctly passed to the executing pgm.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rajesh S
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 54
Location: Chennai

PostPosted: Wed Jan 18, 2012 9:55 am
Reply with quote

Dear All,

I am passing some values to the executing program thru PARM parameter. These values are not correctly passed to the program.


Below is the EXEC statement in JOB.
//STEP1 EXEC PGM=PROG1,PARM=2120104XX,REGION=4096K

Below the Linkage section field decalaration.
LINKAGE SECTION.
01 PARMAREA.
05 PRM-LENGTH PIC S9(4) COMP.
05 PRM-DATE.
10 PRM-DATE-1 PIC X(1).
10 PRM-DATE-YY PIC X(2).
10 PRM-DATE-MM PIC X(2).
10 PRM-DATE-DD PIC X(2).
05 PRM-FREQ PIC X(1).
05 PRM-REPORT-IND PIC X(1).

Below is the abend getting during the execution.

IEA995I SYMPTOM DUMP OUTPUT
SYSTEM COMPLETION CODE=0C4 REASON CODE=00000004
TIME=02.25.14 SEQ=36492 CPU=0000 ASID=016F
PSW AT TIME OF ERROR 078D0000 9FD02BEE ILC 6 INTC 04
ACTIVE LOAD MODULE ADDRESS=1FD02BE8 OFFSET=00000006
NAME=DSNALI
DATA AT PSW 1FD02BE8 - D3C9C3C5 D5E2C5C4 40D4C1E3
GR 0: 1FD010CC 1: 1FD010A0
2: 00000000 3: 00007000
4: 0098B000 5: 00988398
6: 7F4FB4D0 7: 7F4FB4D0
8: 1AA34C98 9: 00BE4008
A: 1FD01000 B: 00007000
C: 1AA26D10 D: 1FD01250
E: 9AA26DAE F: 1FD02BE8
END OF SYMPTOM DUMP
IEF472I F36981CT S1CP01 - COMPLETION CODE - SYSTEM=0C4 USER=0000 REASON=00000004


Please let me know, your valuable comments to resolve the issue.

Thanks in Advance.

Thanks!
Rajesh S.
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Wed Jan 18, 2012 10:16 am
Reply with quote

Hi Rajesh,

By looking to the dump, it doesnt look like the error is becuase PARM values are not getting passed correctly

Can you please provide cod ein your program?

Regards,
Chandan
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Jan 18, 2012 10:18 am
Reply with quote

In the JCL, the parm value needs to be enclosed in quotes as '2120104XX'.

To ensure the program has received the proper parm-length, check that PRM-LENGTH is not less than LENGTH OF PRM-DATE.

Also, PRM-FREQ and PRM-REPORT-IND must be defined as level 10 and NOT as level 05 as they are elementary items of group PRM-DATE.

Mr. Bill
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Wed Jan 18, 2012 10:26 am
Reply with quote

Thanks Bill..

Missed the linkage section code in my earlier post..

-Chandan
Back to top
View user's profile Send private message
Rajesh S
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 54
Location: Chennai

PostPosted: Wed Jan 18, 2012 12:00 pm
Reply with quote

Hi Bill,

Thanks for your response.

I have ensured the parm-length in both program as well as in JCL, both are same only.

I hope, level numbers might not be an issue. Because in production, it works as expected. Issue is raising in test region alone.

Thanks!
Rajesh S.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 18, 2012 12:44 pm
Reply with quote

Can you, from your compile listing, show the PROCEDURE DIVISION USING, please?
Back to top
View user's profile Send private message
Rajesh S
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 54
Location: Chennai

PostPosted: Wed Jan 18, 2012 1:14 pm
Reply with quote

Hi Bill,

Please find the below Compiler listing and procedure division declaration.

Compiler Options in effect:
NOADATA
NOADV
APOST
ARITH(COMPAT)
AWO
BUFSIZE(28672)
NOCICS
CODEPAGE(1140)
NOCOMPILE(E)
NOCURRENCY
DATA(31)
NODATEPROC
NODBCS
NODECK
NODIAGTRUNC
NODLL
NODUMP
DYNAM
NOEXIT
NOEXPORTALL
NOFASTSRT
FLAG(I,E)
NOFLAGSTD
INTDATE(ANSI)
LANGUAGE(EN)
LIB
LINECOUNT(60)
LIST
MAP
NOMDECK
NONAME
NSYMBOL(DBCS)
NONUMBER
NUMPROC(MIG)
OBJECT
NOOFFSET
OPTIMIZE(STD)
OUTDD(SYSOUT)
PGMNAME(COMPAT)
RENT
RMODE(AUTO)
NOSEQUENCE
SIZE(MAX)
SOURCE
SPACE(1)
NOSQL
NOSQLCCSID
NOSSRANGE
TERM
TEST(NONE,SYM,SEPARATE)
NOTHREAD
TRUNC(OPT)
NOVBREF
NOWORD
XREF(FULL)
YEARWINDOW(1900)
ZWB


Procedure division declare as below:

PROCEDURE DIVISION USING PARMAREA.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 18, 2012 2:06 pm
Reply with quote

Why do you think the PARM is the problem?

If you look at the dump, the offset is 6! The program is DSNALI, and the PSW, which should be pointing to some code, contains the value "LICENSED MAT".

Are you using DB2? Can you show us the JCL that executes the program?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 18, 2012 2:06 pm
Reply with quote

there is no evidence that the parameter passing is wrong.
to get that evidence You should at program startup jus print/display the parm length and the parm value
simple snippet...
Code:
 ****** ***************************** Top of Data ******************************
 000001        IDENTIFICATION DIVISION.                                         
 000002        PROGRAM-ID     PARMS.                                           
 000003        AUTHOR.        <SOME AUTHOR>                                     
 000004        ENVIRONMENT    DIVISION.                                         
 000005        DATA           DIVISION.                                         
 000006        WORKING-STORAGE SECTION.                                         
 000007        LINKAGE         SECTION.                                         
 000008        01 ARGS.                                                         
 000009           05 ARGL         PIC S9(04) COMP.                             
 000010           05 ARGV         PIC X(100).                                   
 000011        PROCEDURE      DIVISION USING ARGS .                             
 000012            DISPLAY 'ARG LENGTH  :' ARGL .                               
 000013            IF ARGL > 0                                                 
 000014            DISPLAY 'ARG VALUE   :' ARGV .                               
 000015            GOBACK.                                                     
 ****** **************************** Bottom of Data ****************************

after that You can start the real debugging

the abend is inside a DB2 module/stub

Quote:
Because in production, it works as expected. Issue is raising in test region alone.


a forum is not the best place to ask why something
works in <some> environment and does not work in <the other> environment

it is much more productive to look for the <differences> inside Your organization

work with Your support to find out about them
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 18, 2012 2:36 pm
Reply with quote

enrico, I like the formatting of the divisions/sections.

Just a couple of extra thoughts.


Code:
 000001        IDENTIFICATION DIVISION.                                         
 000002        PROGRAM-ID.    PARMS.                                           
 000005        DATA           DIVISION.                                         
 000007        LINKAGE         SECTION.                                         
 000008        01  ARGS.                                                         
 000009            05 ARGL            PIC S9(04) COMP.                             
 000010            05 ARGV.
                      10 FILLER OCCURS 0 TO 100 TIMES
                          DEPENDING ON ARGL.
                         15  FILLER   PIC X.
 000011        PROCEDURE      DIVISION USING ARGS.                             
 000012            DISPLAY "ARG LENGTH  >" ARGL "<"
 000014            DISPLAY "ARG VALUE   >" ARGV "<"   
 000015            GOBACK
                   .                                                     
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Jan 18, 2012 2:42 pm
Reply with quote

Rajesh S,

there you are. A very nice solution of Bill Woodger.
Back to top
View user's profile Send private message
Rajesh S
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 54
Location: Chennai

PostPosted: Wed Jan 18, 2012 2:45 pm
Reply with quote

Program not using DB2, but some called program will use. I did the Xped and confirm that, PARM values are having SPACES/JUNK values..

Now am checking with some other programs, That also abend with same reason. I have compiled my programs using CHANGEMAN.

I couldnt find the module DSNALI in any load libraries.

Thanks in advance.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 18, 2012 2:54 pm
Reply with quote

we are just wasting time
nothing You posted makes any sense
if the <parms> passed are <wrong> start with the snippets we posted to find out why

dir you tell the truth when You said
Code:
//STEP1 EXEC PGM=PROG1,PARM=2120104XX,REGION=4096K


in prog1 did You process the parms along the lines of the snippets shown ?

with the info You posted all we can do is wild guessing

work with Your support

and as a last comment

parm values are passed correctly , it is Your program that is not able to retrieve them. AMEN
Back to top
View user's profile Send private message
Rajesh S
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 54
Location: Chennai

PostPosted: Thu Jan 19, 2012 12:05 pm
Reply with quote

Issue got resolved after include the load module of DSNALI from the library dataset as below.

//JOBLIB DD DSN=E2022TDA.DB2TEST.DSNLOAD(DSNALI),DISP=SHR


Quote:
we are just wasting time
nothing You posted makes any sense


I have tested the snippets, its working fine without load module (DSNALI).
Am not posted anything without sense to wasting your times. If you feel like tat, Really sorry for tat.

Anyway, thanks for your valuable commands.
Back to top
View user's profile Send private message
lindovaldolpn

New User


Joined: 25 Feb 2010
Posts: 16
Location: Brazil

PostPosted: Thu Jan 19, 2012 7:44 pm
Reply with quote

Problably your program does call another assembler/db2 program. And this program abended.
Whey you run a db2 program you need execute using IKJEFT01 or compile your program including CAF modules. The second way is rarely.

You can use...
//STEP01 EXEC GM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DSN?)
RUN PROGRAM(PROG1) PLAN(PROG1??) PARM('2120104XX') -
LIB('your.loadlib')
END
//* Your JCL complement


Regards
Lindovaldo
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
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 DB2 Event passed to the Application P... DB2 1
Search our Forums:

Back to Top