Page 1 of 1

Where can i get a Universe BASIC Compiler

Posted: Mon Dec 20, 2004 11:41 pm
by memrinal
i need a Universe BASIC Compiler to compile a BASIC program from the command prompt. Where can i get the Compiler

Posted: Tue Dec 21, 2004 12:38 am
by ray.wurlod
You can purchase UniVerse from IBM.

But, is that what you really want? If (as other threads suggest) you are trying to create DataStage BASIC programs, then you need a DataStage BASIC compiler. This is not compatible (any more) with a UniVerse BASIC compiler. Each will successfully compile the same code (with some minor exceptions), however the compiled code produced by the one simply not execute in the other environment. There are many reasons for this, with which I won't bore you.

If you have DataStage you already have the compiler. But it should be invoked from within the dssh environment. The UniVerse BASIC compiler should be invoked from within the uvsh environment.

Posted: Sat Dec 25, 2004 3:12 am
by dsxdev
Hi Ray,
You quoted
If you have DataStage you already have the compiler. But it should be invoked from within the dssh environment. The UniVerse BASIC compiler should be invoked from within the uvsh environment.

can you just give a snippet to compile a BASIC program .
Are BASIC program different from routines or are they same?
If they are different then what is teh difference.

Posted: Sat Dec 25, 2004 3:14 am
by dsxdev
how skould it be invoked first

Code: Select all

uvsh 
then followed by

Code: Select all

dssh 
or revers

Code: Select all

uvsh 
and

Code: Select all

dssh
How do these commands work?

Posted: Sat Dec 25, 2004 2:48 pm
by ray.wurlod
Are BASIC program different from routines or are they same?

A program has no arguments, begins with a PROGRAM declaration, and finishes with an END statement. There is no way, using DataStage clients, to create a program.

A routine has one or more arguments, begins with a SUBROUTINE or FUNCTION declaration, and finishes with a RETURN statement (or RETURN() function in the case of a function). DataStage clients can be used to create functions with one or more arguments, and only one kind of subroutine (a before/after subroutine, with exactly two arguments). The language allows for subroutines with zero or more arguments, but you cannot create these using DataStage clients.

Programs can be run from the DataStage/UniVerse shell command line; routines with arguments can not.

Given that you lack the tools to create a program, there doesn't seem to be much point in knowing how to compile one.


How do these commands work?

The dssh command invokes the DataStage shell, provided you are attached to a directory that is a DataStage project.

The uvsh command invokes the UniVerse shell, provided that you are attached to a directory that is a UniVerse account.

They are completely separate shells, in the same way that /bin/sh and /bin/ksh are completely separate shells, even though there is a lot of overlap in functionality.

Prior to version 6.0, DataStage used UniVerse as its engine. Since then this has not been the case; indeed, code compiled on the one will not run on the other.


i need a Universe BASIC Compiler to compile a BASIC program from the command prompt.

Unless you have UniVerse installed on your machine, and unless you have the means to create BASIC programs (as opposed to routines), you don't need any such thing.

If you do have UniVerse installed on your machine, you already have its BASIC compiler.

Both the UniVerse BASIC compiler and the DataStage BASIC compiler are invoked from within their respective shells, not from the UNIX command line.