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

Problem using BPXWDYN


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
easebourne_ironfist

New User


Joined: 04 Mar 2013
Posts: 13
Location: Hyderabad

PostPosted: Fri Mar 08, 2013 3:06 pm
Reply with quote

HI Robert .
I have been trying running the given COBOL and getting below mentioned values in sysout
ALLOC DIAG CODE = 0000J
ALLOC KEY VALUE = 0064L
ALLOC DIAG CODE = 0000J
ALLOC KEY VALUE = 0064L

Also i see when BPXWDYN is getting called it returns -00000623 as return code .

I tried various ways of using BPXWDYN in Rexx and its working fine .

Is it like i need to modify the program in some way to run properly .
I did changed the LRECL ,BLCKSZE for my particular use .

Regards
easebourne_ironfist
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: Fri Mar 08, 2013 3:21 pm
Reply with quote

Please don't tailgate an old topic, but start with a new question. Especially when the topic is a "Sticky".

Have you looked up what the various codes mean?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Fri Mar 08, 2013 4:44 pm
Reply with quote

easebourne_ironfist wrote:
I tried various ways of using BPXWDYN in Rexx and its working fine .
Is it like i need to modify the program in some way to run properly .I did changed the LRECL ,BLCKSZE for my particular use .
Are you not contradicting yourself - either it's working fine OR it's not and you need change - -what is it?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Fri Mar 08, 2013 5:21 pm
Reply with quote

quite strange, I was curious...
downloaded/compiled/tested/WORKED AS IS
Back to top
View user's profile Send private message
easebourne_ironfist

New User


Joined: 04 Mar 2013
Posts: 13
Location: Hyderabad

PostPosted: Fri Mar 08, 2013 5:42 pm
Reply with quote

HI Bill ,
Yes i did tried to understand the meaning of codes .
10 WS-BPXWDYN-RC2 > -0643 (ALLOC KEY VALUE )
10 WS-BPXWDYN-RC1 > -0001 (ALLOC DIAG CODE)

I get an idea that there is some key error while calling BPXWDYN.But why is it happening ,i am unable to understand .
Back to top
View user's profile Send private message
easebourne_ironfist

New User


Joined: 04 Mar 2013
Posts: 13
Location: Hyderabad

PostPosted: Fri Mar 08, 2013 5:47 pm
Reply with quote

Hi Anuj,
I guess the mentioned COBOl program is supposed to have the same effect as below rexx .
ALLOCSTR = "ALLOC DD(G035DD01) DSN('TEST.JXB.PRADEEP.PS')",
"NEW CATALOG REUSE RELEASE",
"RECFM(F,B) UNIT(SYSDA) DSORG(PS) LRECL(80) BLKSIZE(0)"
CALL BPXWDYN(ALLOCSTR)

I meant this RExx is running fine . but COBOL seems to have some problem

Please suggest the meaning of these codes and where exactly i am going wrong .
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Fri Mar 08, 2013 5:59 pm
Reply with quote

from Your initial post
Quote:
I have been trying running the given COBOL and getting below mentioned values in sysout

it looked like You were trying to run the READPDS cobol example

BPXWDYN has some quirks...
a couple of keywords are different from the <equivalent>ones for allocate
Back to top
View user's profile Send private message
easebourne_ironfist

New User


Joined: 04 Mar 2013
Posts: 13
Location: Hyderabad

PostPosted: Fri Mar 08, 2013 7:42 pm
Reply with quote

Tried a lot but couldnt fix the problem .

But still thanks a lot to Robert for introducing me to 'BPXWDYN' . I guess its best to use it with REXX.

Just in case anybody has a clue these are the values of the variables i get on calling 'BPXWDYN'
05 WS-BPXWDYN-RC > -00000643
10 WS-BPXWDYN-RC1 > -0001
10 WS-BPXWDYN-RC2 > -0643
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8651
Location: Dubuque, Iowa, USA

PostPosted: Fri Mar 08, 2013 9:11 pm
Reply with quote

You have provided the equivalent REXX code to what you want the COBOL to do, but you have not posted the COBOL allocation statement (use a DISPLAY just before the CALL to BPXWDYN). BPXWDYN does have some quirks, and it is EXTREMELY sensitive to the parameters being passed to it -- but from what I've seen, once you get the exact parameters specified there is no difference between the COBOL and REXX calls to BPXWDYN.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Fri Mar 08, 2013 10:01 pm
Reply with quote

Quote:
just in case anybody has a clue these are the values of the variables i get on calling 'BPXWDYN'

the manual certainly does icon_cool.gif

as per bpxwdyn doc
Quote:
Understanding Key Errors

The low order two digits is the number of the key that failed the parse, offset by 20. The first key will have the value 21.

The high order two digits is a diagnostic code that indicates where in the code the parse failed. If the high digits are 0, the key itself was probably not recognized. Other values usually indicate a problem with the argument for the failing keyword. Likely causes are blanks in arguments that are not quoted and spelling of key names.

Understanding Dynamic Allocation Error Codes

The return code contains the dynamic allocation error reason code in the high two bytes and the information reason code in the low two bytes.

You can use the high four hex digits to lookup the error code in the dynamic allocation error reason codes table found in the Application Development Guide for Authorized ASM Programs.


nobody will do the manual reading and decoding for You
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Sat Mar 09, 2013 3:23 pm
Reply with quote

And here are some old threads on similar topic:

ibmmainframes.com/viewtopic.php?t=58378&highlight=bpxwdyn
ibmmainframes.com/viewtopic.php?t=52353&highlight=bpxwdyn
ibmmainframes.com/viewtopic.php?t=52206&highlight=bpxwdyn
ibmmainframes.com/viewtopic.php?t=41691&highlight=bpxwdyn
ibmmainframes.com/viewtopic.php?t=41601&highlight=bpxwdyn
ibmmainframes.com/viewtopic.php?t=35005&highlight=bpxwdyn
ibmmainframes.com/viewtopic.php?t=21262&highlight=bpxwdyn
ibmmainframes.com/viewtopic.php?t=13755&highlight=bpxwdyn
ibmmainframes.com/viewtopic.php?t=7472&highlight=bpxwdyn
ibmmainframes.com/viewtopic.php?t=5501&highlight=bpxwdyn
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Sat Mar 09, 2013 4:03 pm
Reply with quote

Look for IKJ or IEF messages.
Back to top
View user's profile Send private message
easebourne_ironfist

New User


Joined: 04 Mar 2013
Posts: 13
Location: Hyderabad

PostPosted: Sun Mar 10, 2013 7:45 pm
Reply with quote

Thanks Robert ,
Problem found . Parameter were getting misalligned .SHR was coming as as SH R .Also since DS name was DELIMITED BY SPACE and i had space between the DS name and column 1 it didnt picked the DS .
Back to top
View user's profile Send private message
easebourne_ironfist

New User


Joined: 04 Mar 2013
Posts: 13
Location: Hyderabad

PostPosted: Sun Mar 10, 2013 7:48 pm
Reply with quote

Thanks to Anuj too for posting the links . It improved my understanding on BPXWDYN.
Back to top
View user's profile Send private message
easebourne_ironfist

New User


Joined: 04 Mar 2013
Posts: 13
Location: Hyderabad

PostPosted: Sun Mar 10, 2013 8:19 pm
Reply with quote

enrico-sorichetti
Thanks for enlightneing me icon_wink.gif
I did looked key error descrption in "Using REXX and zOS UNIX System" manual but couldnt make much out of it . Didnt knew what 'key' meant exactly in this context .
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Sun Mar 10, 2013 9:27 pm
Reply with quote

Thanks for the follow up and telling what worked for you. Appreciate that.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts COBOL - create and write to output fi... COBOL Programming 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top