Page 2 of 3

Re: Static Link Error for BPXWDYN - SYMBOL BPXWDYN UNRESOLVE

PostPosted: Thu Jun 14, 2012 11:26 pm
by Robert Sample
The question in my mind is, have you even tried a dynamic call to BPXWDYN? Add something like
77  WS-SUB-PROG PIC X(08) VALUE 'BPXWDYN '.
and change your call from CALL 'BPXWDYN' USING ... to CALL WS-SUB-PROG USING ... since BPXWDYN is in SYS1.LINKLIB and hence will be resolved at run time.

And to answer your implied question, no my program code is CALL WS-SUB-PROG not CALL 'BPXWDYN ' -- static linking is a linkage editor / binder activity and not necessarily related to the COBOL CALL statement (although in most cases it is). This shows the module in the load library for my program:
 ISRBROBA DSLIST 0.COMPILES.LOADLIB(MF0084L)          Line 00000000 Col 070 149
 Command ===>                                                  Scroll ===> CSR
********************************* Top of Data **********************************
...CEESG005...h....EDCXABND........@@XABND ........EDCXBTCA...&...4@@XCBLN ....
.  @@KTGTC ...}....@@PMASK ......  @@XLOAD ......  @@XUNLD ......  CEESG003.....
...EDCXFREE...-...dEDCXGET ...y...:@@XINIT@......  @@INIT@ ......  CTDLI   .....
...EDCXHFRE........EDCXHGET... ...h@@XTEND ...à....EDCXMEM ...h...8MALLOC  ...}.
..àSPRINTF ...... @@TRT   ..$h....EDCXSTRT..*h...}@@XSTRT ..*h...c@@RCINIT.....
..¢DYNALLOC..x8...¢DYNOUT  ..ð....¢MAIN    .......¢BPXWDYNS........BPXWDYNA.....
.  IGZETUN ......  CEEINT  ...0...sCEEARLU ... ...àCEEBPIRA...0...}CEEBPIRB...0.
.  CEESG009......  CEESG010......  CEESG011......  CEESG012......  CEESG013.....
................................................................................

400 ....|~..569623400 .....PL/X-390  ..................................c~i.56962

37....½.RSI32732841....½.RSI32731029....½.RSI32731455....½.RSI32731565....½.RSI3
8856.m....RSI12159557.p....RSI12159552.o....RSI12159616.n....RSI12159673......RS
..8...ý...ë. .à.b...c.}.....i.~
..ò...........H...å.. .....MF0084  20120614103635030401.......%s_..~.~....~. ..
..........m...q...........8...÷...............f...¢...+...:...ð.......Ÿ...·.....
..˜.......&.......u.......m...d.......%...ó...ù.................................
..................ü...............................0...........}.......4.........
..Y... ...U..a8. . .......Y..a÷..b...i....~...d...h..q...q...q...$.... ..i.... .

hk...&}...K..&.}ë||..q&..g}..aq}óqý..a...h-.wg...na&.g ..ni&.g}.fnj&.g .+nr&.g
..o...s..g&..g*..gy..g...g~...¢..sõ.l.¢...ï...¢...ò..gh.b.¢..v*.a.¢..xU..v-.(.¢.

ï$0}mg0....a&&...i...a.Ÿh.u¢ý.y&ýü.a.ü.q0.b.®&0..aý..qà.. ýà.qý.. .ý.qý..  ý..dg
.x...x...x...xf..õ‘..õð..õ6..\...\...F...F...F...F¢..O:..Of..Ok..WD..W}..Wü..WY.

.a.Rhaà..&àŸQa.ŸQq0.u.®&0..aà..q... à..qà.. à.qà.. à.qà..a..BK.à...g0.h..q.}i
p.¢...Y.o.¢...U.l.¢...˜.b.¢...{.a.¢...D...¢...H.n.¢.....&.¢...}.j.¢...M.l.ë.f.ý.
BPXWDYN COMPILED AT 17:17:53 ON Feb 28 2006.......... ....a.. ............a.....


Further, you may need to look at the BPXWDYN in SYS1.LINKLIB since the linkage editor / binder messages seem to indicate there's no entry point labelled BPXWDYN in the load module, which could be a problem since your program is going to be attempting to use BPXWDYN as the entry point.

Re: Static Link Error for BPXWDYN - SYMBOL BPXWDYN UNRESOLVE

PostPosted: Thu Jun 14, 2012 11:46 pm
by hienrbc
I have NO problem with dynmic call using CALL WS-PGM (where WS-PGM = 'BPXWDYN') but is this mean that if somebody
updates BPXWDYN, my program will pickup the updated one? (which I don't want to, as long as it worked, I don't want the risk of the job fails in Production).
and I thought by using CALL 'BPXWDYN' is the right way to do.
Thank a lot.

Re: Static Link Error for BPXWDYN - SYMBOL BPXWDYN UNRESOLVE

PostPosted: Thu Jun 14, 2012 11:49 pm
by Akatsukami
hienrbc wrote:I have NO problem with dynmic call using CALL WS-PGM (where WS-PGM = 'BPXWDYN') but is this mean that if somebody
updates BPXWDYN, my program will pickup the updated one? (which I don't want to, as long as it worked, I don't want the risk of the job fails in Production).

It is unlikely in the extreme that IBM will release a version of BPXWDYN that is not backwards compatible and extensively tested. Do not judge them by the standards of modern software engineers, or even of open source hackers.

Re: Static Link Error for BPXWDYN - SYMBOL BPXWDYN UNRESOLVE

PostPosted: Thu Jun 14, 2012 11:53 pm
by enrico-sorichetti
I have NO problem with dynmic call using CALL WS-PGM (where WS-PGM = 'BPXWDYN') but is this mean that if somebody
updates BPXWDYN, my program will pickup the updated one? (which I don't want to, as long as it worked, I don't want the risk of the job fails in Production).
and I thought by using CALL 'BPXWDYN' is the right way to do.
Thank a lot.

:shock: :shock: :shock:
if the BPXWDYN is updated it means that IBM fixed something, and You would not want to carry on using something broken, would you?
and in case of a change/upgrade of the zOS You would not want to keep using an older version in the new system.
the proper way is to use a dynamic call

Re: Static Link Error for BPXWDYN - SYMBOL BPXWDYN UNRESOLVE

PostPosted: Fri Jun 15, 2012 12:01 am
by Robert Sample
this mean that if somebody updates BPXWDYN, my program will pickup the updated one?
Yes, this is a true statement. HOWEVER, you need to realize that IBM has been putting out software for 360 and successor machines for almost 50 years now, and the odds are VASTLY higher that your code is wrong than that IBM would release a new version of BPXWDYN that would cause problems to existing users of it. Such things happen, but IBM usually gives several YEARS warning when such a change is coming. The JCL Reference manual still refers to 3330 disk drives, even through they were last on the market in 1983 -- 29 years ago.

Re: Static Link Error for BPXWDYN - SYMBOL BPXWDYN UNRESOLVE

PostPosted: Fri Jun 15, 2012 12:16 am
by hienrbc
True, I am with you BUT in this case, I only call this to do 1 simple task which to allocate/unallocate the files.
(If it's not broken then don't fix it)

Re: Static Link Error for BPXWDYN - SYMBOL BPXWDYN UNRESOLVE

PostPosted: Fri Jun 15, 2012 12:25 am
by enrico-sorichetti
True, I am with you BUT in this case, I only call this to do 1 simple task which to allocate/unallocate the files.
(If it's not broken then don't fix it)


as You like,
I just wasted my time trying to give professional advice to a stubborn amateur :evil:

Re: Static Link Error for BPXWDYN - SYMBOL BPXWDYN UNRESOLVE

PostPosted: Fri Jun 15, 2012 12:41 am
by hienrbc
I am sorry...I have to convince my boss the other way...

Re: Static Link Error for BPXWDYN - SYMBOL BPXWDYN UNRESOLVE

PostPosted: Fri Jun 15, 2012 12:45 am
by enrico-sorichetti
Your pointed head boss cannot expect professionals to support a wrong approach ! ;)

Re: Static Link Error for BPXWDYN - SYMBOL BPXWDYN UNRESOLVE

PostPosted: Fri Jun 15, 2012 12:56 am
by Robert Sample
You might try telling your boss that multiple professionals with many years of experience with mainframes are telling you NOT to use static link, so your boss is wanting you to go against LOTS of accumulated knowledge.