Variable declaration in BASIC

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dsstarter
Participant
Posts: 10
Joined: Wed Mar 29, 2006 10:32 pm

Variable declaration in BASIC

Post by dsstarter »

Hi All,
My question sounds simple to you all but I could not find the answer for this in my search here.

I am converting a cobol program to basic routine and this is my first
datastage project....my question is

how can i declare a basic variable of length 200 and datatype is CHAR

Starter
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's not like COBOL. There's no "working storage" and variables do not need to be explicitly declared. Also, there is no size or type associated with variables. Best to initialize them to a value so they start off live in a known state, however.

Are you sure you need to go this route, however? Are you sure the COBOL program shouldn't be converted to a DataStage job? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

There are no declarations required. There are no data types. Variables automatically cast when necessary. Dates are text strings. Dynamic arrays (notated with < and > instead of parenthesis) need declaration to "" as in

Code: Select all

myarray = ""
Read your DS BASIC manual on the Start button and learn about these functions: ICONV, OCONV, FMT, INDEX, COUNT, SUBSTR, LEFT, RIGHT, FIELD.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply