You are on page 1of 1

AMODE and RMODE considerations

All OS/VS COBOL programs are AMODE 24 and RMODE 24. Enterprise COBOL programs are always AMODE A ! and "an #e eit$er RMODE 24 or RMODE A !. %$e &OR'( )*S%ORA)E data items "an #e eit$er a#o+e or #elow t$e ,-*MB line. #ased on t$e DA%A. RE % and RMODE "ompiler options. OS/VS COBOL programs "an /se CALL statements to "all Enterprise COBOL programs wit$o/t AMODE pro#lems. #e"a/se #ot$ programs "an a""ess #elow t$e ,-*MB line data. &$en an Enterprise COBOL program /ses a CALL statement to "all an OS/VS COBOL program. yo/ "an get addressing e0"eptions i1 yo/r data or parameter list is a#o+e t$e ,-*MB line. %o a+oid addressing e0"eptions. ens/re t$at all o1 yo/r data and parameter lists are #elow t$e ,-*MB line #y "ompiling wit$ DA%A2243 1or RE % programs. or RMODE2243 or RMODE2A4%O3 1or ORE % programs. ote5 6or Lang/age En+ironment releases prior to Version 2 Release 7. a re8/est 1or DA%A29,3 mig$t $a+e res/lted in Lang/age En+ironment a"8/iring t$e storage #elow t$e ,-*MB line. so t$at in"orre"tly "ompiled programs "o/ld pass parameters to OS/VS COBOL programs wit$o/t addressing e0"eptions. A1ter mo+ing to Lang/age En+ironment .Version 2 Release 7 or later. t$is in"orre"t /se o1 DA%A29,3 wo/ld res/lt in t$e e0pe"ted addressing e0"eption. 6ig/re : s$ows t$e res/lts o1 di11erent "om#inations o1 "ompiler options and "ompilers. All CALL statements are dynami" and represented #y arrows. %$e solid lines represent +alid CALL statements; t$e dotted line represents a "all t$at is not +alid. <, and <= are OS/VS COBOL programs. so t$e &OR'( )*S%ORA)E data items are in"l/ded in t$e o#>e"t mod/le. and m/st #e #elow t$e ,-*MB line. 6or Enterprise COBOL programs t$at were "ompiled wit$ t$e RE % option. &OR'( )*S%ORA)E data items are separate 1rom t$e o#>e"t mod/le. and t$eir lo"ation is "ontrolled #y t$e DA%A "ompiler option 2as wit$ programs <2 and <93. 6or programs "ompiled wit$ ORE %. t$e &OR'( )*S%ORA)E data items are in"l/ded in t$e o#>e"t mod/le. so t$eir lo"ation depends on t$e RMODE option 2as wit$ program <43. All o1 t$ese "alls will wor? s/""ess1/lly. e0"ept 1or <9 "alling <=. Be"a/se <9 was "ompiled wit$ RE % and DA%A29,3. its &OR'( )*S%ORA)E and any parameter lists are lo"ated a#o+e t$e ,-*MB line. %$is means t$at e+en i1 <9 is passing parameters t$at it re"ei+ed 1rom <2. t$e parameter list "annot #e addressed #y <=. so t$e CALL will 1ail. %$e CALL will also 1ail i1 t$e parameters t$emsel+es are a#o+e t$e ,-*MB line. s/"$ as data items in t$e &OR'( )*S%ORA)E SEC%(O o1 <, and <9. ote5 Stati" CALL statements 1rom AMODE 9, programs to OS/VS COBOL programs will always 1ail.

You might also like