[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference tallis::alpha_migration_tools

Title:Alpha Migration Tools - Digital Confidential
Notice:Kits: VEST v1.1A: Note 15.60, mx v1.2-4: Notes 4.23 & 4.24
Moderator:TALLIS::GORTON
Created:Wed Jun 13 1990
Last Modified:Mon May 26 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:970
Total number of notes:4239

956.0. "Vesting problem on Cobol calling Basic" by HANDVC::STEVELIU () Fri Feb 28 1997 05:09

P1 is a Cobol program which calls P2 (a BASIC subroutine), I
execute these steps :

on VAX,

1) cobol p1.cob
2) basic p2.bas
3) link p1.obj,p2.obj
4) run p1

String found !

on Alpha,

5) vest p1
6) run p1_tv

%NONAME-W-NOMSG, Message number 00000000

source of p1 and p2 are as follows :

P1.COB :
======

identification division.
program-id. caller.

data division.
working-storage section.
01 a pic x(26) value "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
01 b pic x(3) value "XYZ".
01 c pic 9(5) display.

procedure division.
0001.
    call "srch" using	by descriptor a,
			by descriptor b,
			by descriptor c.
    if c is not equal to "0" then display "String found !".
    stop run.

P2.BAS :
======

10 sub srch by desc (string a$, string b$, string c$)
 	d$ = trm$(b$)
	c$ = num1$(pos(a$, d$, 1%))
   end sub

please advise how to make it work. I expect after vesting, the image
will produce the same result on Alpha as compared to VAX.







T.RTitleUserPersonal
Name
DateLines
956.1TALLIS::wlfgng.amt.tay1.dec.com::nelsonIt's not the years it's the mileage!Fri Feb 28 1997 09:4123
	If you're going to report problems, you really need to also report what version
of VMS you're linking your objects on.  Please verify that you're linking on OpenVMS
V5.4-2 (the only version of VMS that you can link your objects and translate them).


	Be that as it may, I tried your example and discovered that it won't VEST;
please also report VEST errors that are reported.  The following is a warning; we made
it that because it's possible this address might not actually get called.  But if it
does, it could be your problem.


	If I were debugging this, I would try to find out what message it trying to
get reported.


%VEST-W-UNSUPABSREF, Reference to unsupported absolute address  (P1_space+000EDF
40)
        At:    CALLER\CALLER\16 [COBOL] (00000649)
        Input: CALLG  E4(R11),@#7FFEDF40
%VEST-W-TRANSWARN, Translation completed with warnings -- review them before usi
ng the output image

956.2Works for meTALLIS::wlfgng.amt.tay1.dec.com::nelsonIt's not the years it's the mileage!Fri Feb 28 1997 16:126
In addition, I just tried your sample and it worked just fine for me.


Brian


956.3VEST version which has problemHANDVC::STEVELIUMon Mar 03 1997 05:0918
    
    version of VEST I'm using is :
    
            Image Identification Information
    
                    image name: "VEST_TV"
                    image file identification: "V1.1A-0"
                    link date/time: 13-OCT-1994 11:12:46.83
                    linker identification: "V1.1A-0"
    
            Patch Information
    
                    There are no patches at this time.
    
    
    which version are you using in .2 ?
    
     
956.41.1ATALLIS::wlfgng.amt.tay1.dec.com::nelsonIt's not the years it's the mileage!Mon Mar 03 1997 11:4712
I'm using V1.1A, which is the latest released version.  It sounds like something isn't
set up correctly on your system; I can't think why else the same code would translate
fine for me and not for you.

A couple of folks have asked why you're not using the Alpha version of the COBOL
compiler; is there any technical reason not to use it?



Brian

956.5VESTing vs RecompilationHANDVC::STEVELIUTue Mar 04 1997 20:5810
    
    The reason we prefer to use VEST is because we have limited time
    to migrate a large volume of Cobol applications to Alpha.
    
    We tend to think VEST is the fastest way to get us there even if
    Alpha Cobol compiler is available.
    
    Any advices you could offer for us.
    
    steve 
956.6VAX Basic did some really strange thingsHNDYMN::MCCARTHYA Quinn Martin ProductionWed Mar 05 1997 05:577
>>    Any advices you could offer for us.

I believe that VESTing of any image containing BASIC code is likly to cause 
problems and there are some areas of the language that simply will not 
VEST correctly.

Brian J. - (who once worked on the port of BASRTL to DEC$BASRTL (Alpha))
956.7TALLIS::wlfgng.amt.tay1.dec.com::nelsonIt's not the years it's the mileage!Wed Mar 05 1997 11:4318
It's been ages (first year in college) since I wrote COBOL, but my understanding is
that it's a VERY standard language.  Certainly I would expect very few differences
between VAX COBOL and DEC COBOL (Alpha version).

That being the case, I would at LEAST investigate using the native compiler.  If all
you have to do is recompile, you're golden.  Plus you get native performance.

Brian (the other one) is right -- the VAX BASIC RTL has some problems, although I
think we weeded out quite a few.  WHEN clauses are a case in point -- **READ** the
VEST release notes for what to do about WHEN clauses.

VEST was meant as a transition tool, not a long-term migration path.  Now that all
the compilers have long since been ported, you really should be recompiling.


Brian


956.8Recompilation ??HANDVC::STEVELIUWed Mar 05 1997 22:2113
    
    OK, then Is a VAX BASIC source file 100% compilable with DEC BASIC
    compiler ? if not, what are the exceptions ? same question for
    VAX and DEC Cobol ?
    
    The original VAX sources are compiled by 
    
    -VAX BASIC V3.7 or earlier,
    -VAX COBOL V5.3 or earlier,
    
    which version of DEC BASIC and COBOL should I use to recompile ?
    
    sl.
956.9ask in their own conferencesHNDYMN::MCCARTHYA Quinn Martin ProductionThu Mar 06 1997 05:379
>>    OK, then Is a VAX BASIC source file 100% compilable with DEC BASIC
>>    compiler ? if not, what are the exceptions ?

No its not.  Check out TURRIS::DECBASIC for answers to those questions (it was 
a while ago so I won't even try to put a sub-list here).

I think clt::cobol is the Cobol (VAX and DEC) versions.

bjm
956.10Vesting vs. RecompilationHANDVC::STEVELIUThu Mar 06 1997 23:0323
    
    With a immense volume of basic applications (>1,000,000 line of codes)
    and so many differences found between VAX and DEC BASIC as listed in :
     
    CLT::CLT$LIBRARY:[DECBASIC.KITS]BASIC012_RELEASE_NOTES.TXT;1
    
    under section 4:
    
                 4 Differences Between DEC BASIC and VAX BASIC..........   
    
                  4.1 VAX BASIC Features Not Planned For DEC BASIC......   
    
                  4.2 Incompatible Features Between DEC BASIC and
                      VAX BASIC.........................................    
                  4.3 DEC BASIC Features Not Available in VAX BASIC.....   
    
    can you tell me why recompilation still a better alternative than
    using VEST to migrate the applications ?  Some of these applications
    were written more than 10 years ago.
    
    I need to get every advices that I can get.
    
    steve
956.11If VEST was an option, the native compiler would not be thereHNDYMN::MCCARTHYA Quinn Martin ProductionFri Mar 07 1997 06:0410
>>    can you tell me why recompilation still a better alternative than
>>    using VEST to migrate the applications ? 

Both Brian and me (the other Brian) have told you.  There are potential 
serious problems with VESTING VAX BASIC applications.  Many of which will 
not show up until run time.  If you can be 100% sure that you never 
use the things lised in the pages you describe, and never have an ON ERROR or
WHEN block anywhere then you MAY be safe.

Brian
956.12yHANDVC::STEVELIUSun Mar 09 1997 21:328
    
    can you provide me a sample BASIC program with the use of ON ERROR and
    WHEN clause that will illustrate the differences in run-time behaviour
    ? thanks.
    
    steve
    
    
956.13its ALL possibly brokenHNDYMN::MCCARTHYA Quinn Martin ProductionMon Mar 10 1997 06:0914
>>    can you provide me a sample BASIC program with the use of ON ERROR and
>>    WHEN clause that will illustrate the differences in run-time behaviour
>>    ? thanks.

Its not a difference - its simply broken.  

VAX Basic created call frames "on the fly", transfered control to them and
expected very specific behavior during an unwind (which is how "on error" and
when blocks were implemented on VAX).  VEST simply couldn't keep track of
all the things BASRTL expected.

The entire run-time model was re-written for OpenVMS Alpha.

Brian J.
956.14On Error and WhenHANDVC::STEVELIUMon Mar 10 1997 21:0916
    
    Re: .13
    
    so base on this fact, any BASIC source with the use of ON ERROR and
    WHEN clause should be handled by recompilation, Vest cannot help in
    this case, other than that VEST should have no problem, right ?
    
    In the VEST V1.1A release notes section 3.14.2, it mentions when
    the BASIC source has an WHEN ERROR construct, it must be translated
    with the /OPTIMIZE=NOSCHEDULE qualifier. So I figure vesting is
    not entirely impossible.
    
    sl.