Universe/PICK Basic

Sunday, March 04, 2007

Universe Architecture

This is what you need to know in order to start programming. To make things simple, let's start with command prompt and editor. These are the main platform where programmer do their jobs.

Command Prompt
Before going into Universe command prompt, we'll have to login through unix. From my past working experience, different companies got different ways of login into the Universe. Some directly login to Universe command prompt and some will require further verification to login to specific database. Assuming there are only 1 level authorization required, user will need to login through unix. Eg. :

login : wslee
password : ******

Once the password is verified, system will bring you to Universe command prompt. ">" This is where commands are issued to create files, dictionaries, data listing, and etc. There are hundreds of commands available and i'll briefly go through commands which are commonly used as days goes by. A complete listing of command available can be listed by keyin in HELP. Explaining each of the command will take days. This post will only emphasize on the Universe architecture, i will go into details on commands which i think is useful in the next few posts =) In Universe, there is a main file called VOC, this file will store all the pointer, verbs and etc. The file is created when Universe is setup. If VOC is corrupted, system may encounter various problems and become unstable. It's useful to know how it VOC works, here some few example.

1. File type record in VOC
If you issue a command : ED VOC CUST.MAST , where ED is to call the Editor program and VOC is the fiel and CUST.MAST is the record stored in VOC. The following will be shown.

Record ID : CUST.MAST
0001:- F
0002:- CUST.MAST
0003:- D_CUST.MAST

Notice that line one is F which indicate it's a file, line 2 is the name of the file and line 3 is the file's dictionary. When a file is created using CREATE.FILE command, the following record will be created in the VOC.

2. Q type record in VOC
Record ID : CUST.MAST.LIVE
0001:- Q
0002:- CUST.MAST
0003:- LIVE

There can be multiple databases in a Universe system. It's useful for a programmer to know how to use Q pointer, because it helps on debugging, to obtain information, extract data and to create a testing database. Programmers normally do their job in development server, the record above is to create a pointer for CUST.MAST in the LIVE server.

3. PA type record in VOC
Record ID : LEE.HOLD
0001:- PA
0002:- SETPTR 0,132,66,1,1,3,BRIEF,NFMT,BANNER LEE.RPT

The above record is created in VOC so that, programmer will not have to remember and retype the whole statement everytime he/she need to set the printer on hold. Once the above is created in VOC, typing LEE.HOLD at the command prompt is equivalent to typing the statement on line 2.

These are the main types record stored in VOC, others like K type, V type , D type and etc are system define. Frankly speaking, I'm not sure how some of them works.


Editor
As mentioned above, to command to run an Editor is to type ED at the command prompt. The syntax will be "ED " Usage of the editor is to code programs and to browse through data stored inside a record.

Eg1. ED CUST.MAST WSLEE
Where CUST.MAST is the filename and WSLEE is the Record ID

Eg2. ED LEE.BP PROG1
Where LEE.BP is the Program Folder and PROG1 is the program Name.

Notice that both use the same syntax, the only difference is the file type. From what i know, programs folder must be created under file type 1 and data file must be created under dynamic file. This will be discussed later :) Need to clarify things on this.

As usual, Universe provide extensive help on it's commands, once you enter the editor, you can list out the available commands by typing HELP.

Using the above example : ED CUST.MAST WSLEE
If WSLEE is a new record, the following will be shown :
New record.
----: _

If WSLEE is an existing record, the following will be shown :
28 lines long.
----: _

28 lines long indicate there are 28 fields in the CUST.MAST table.

The cursor will be awaiting an editor command.

Well, i think this is more than enough for a kick start on universe architecture. I'm getting tired and it's 2.55am now, time to get some sleep and will continue when i'm free =)

Sunday, February 25, 2007

Introduction

It was a sleepless night that inspired me to blog this. UNIVERSE a.k.a PICK Basic/InforBasic. People might think it's a term used to define a galaxy, solar system and etc. At least 7 out of 10 person will thought of that, even IT professionals that have been working for years might not even heard about it. Well.. I cant really differentiate whether it's a database or a programming language. Based on my 7 years of experience, and to make things easier for myself, I assume UNIVERSE is a database and PICK is the programming language.
I started my career as a junior programmer. During my first interview session, I recalled, James asking me, "How long do you take to pick up a programming language?". I hesistated for a while and answered. "2 weeks". James looked surprised and smile. Maybe it's because of this answer, i was employed. Was given brief training during the first few days of the job. Maybe it's because i attended PASCAL programming classes during secondary school, I can easily pick up this programming language. Credits also goes to my first mentor - Anne Koay. She teached me alot, and i've learned alot from her.
Looking back from now, I knew why James smiled at me when I answered him. 2 weeks? Maybe his question is just to test the level of my confidence :) If a fresh graduate give me the same answer .. i will smiled just like James. Knowing UNIVERSE is a 2 weeks job, mastering it will take ages. I dare not said i'm an expert, instead.. i'm still exploring and at the same time learning until now. As days goes by i will post more and more information on UNIVERSE, be it for own references or for killing my time doing something meaningful :) More to come.. cheers.