Você está na página 1de 30

jBase Overview & Environment Variables

10 March 2016

ENVIRONMENT VARIABLES
Used to help jBASE
Locate files
Establish search paths
Locate programs
Locate subroutines
Locate the spooler files

Setting Environment Variables


Environment variables are
set in the .profile of
the users home directory

Be sure you export all


environment variables

You can change your


environment variables:
Programmatically in your application.
At the command prompt.

JBCCONNECT=`jbcconnect`
JEDIFILEPATH=.
PATH=/usr/jbc/bin:$PATH
Export JBCCONNECT JEDIFILEPATH PATH

Viewing Environment Variables


echo
Shows you the contents of an environment
variable
echo $ HOME

env
Shows all environment variables

jdiag
Shows all environment variables from a
jBASE perspective
jdiag -vL
5

Most Common Variables


JBCRELEASEDIR
JBCSPOOLERDIR
JBCLISTFILE
LIBPATH

JBCGLOBALDIR

Environment
Variables

JEDIFILENAME_SYSTEM
JEDIFILENAME_MD

JBCCONNECT
PATH

JBCOBJECTLIST
JEDIFILEPATH

Editor

WORKING
WITH
BLOCKS
DELETING
TEXT
REPLACING
TEXT
ADDING
TEXT

EDITING NEW
RECORDS

jBASE
EDITOR

EDITING
EXISTING
RECORDS
STARTING
THE EDITOR

SAVING AND
MOVING
EXITING THE
AROUND
EDITOR
WITHIN THE
EDITOR

Editing Items

JED {DICT} filename record.id

jsh jbtrxx ~ -->JED VOC LISTDICTS


File VOC , Record LISTDICTS
Insert
Command->
001: jacVOID
----------------------------- End of Record ------------

Editor Prompts

If the record does not exist,


a different prompt occurs:
Editor commands
are entered at the
as well as with in
the text

jsh jbtrxx ~ -->JED VOC


NEW
NEW File Voc , Record NEW
Command->
001
------------ End of Record ---------

Command->
prompt

Moving Between The Prompt and Text

Press Enter to move from


the prompt line to the text
Press Esc to
move from the
text to the prompt
line

Enter

Esc

10

Saving and Exiting

From The Command-> prompt


FI

Files and exits the item

EX

Exits without saving

EXIT

Exits without saving


Within The Text

Ctrl X

Exits without saving

11

Moving around within the Editor


Commands entered at the Command-> prompt
nn

Goes to line number nn

Moves to line 1 (beginning)

9999

Moves to line 9999 (end?)

12

Moving around within the Editor


Use the cursor keys to move around within the text

Up one line

Down one line

Right one character

Left one character


13

Moving around within the Editor


Use the cursor keys to move around within the text

End

or ctrl e

End of line

Home

or ctrl a

Down one line

PgUp

Up one page

PgDn

Down one page


14

Add - Delete Text


DELETE TEXT from
within the text

ADD TEXT
Simply position the
cursor in the text
and type

Ctrl d
(2x)

Deletes current
line

Also use backspace and


delete keys

DELETE TEXT from


the Command-> Prompt
DE

Deletes current
line

DE5

Deletes next 5
lines

15

Replace Text

REPLACE TEXT from


Command-> Prompt
R/old/new

change first old to new on current line

R/old/new/3

changes first 3 old to new on current line

RU/old/new/

changes all old to new on current line

R3/old/new

changes first old to new over 3 lines

RU3/old/new

changes all old to new over 3 lines

16

Searching for Strings/Text


L String

L4 String

From the
Command->
Prompt,
locates the
next line
containing
the string

From the
Command->
Prompt,
locate is
restricted
to the next
4 lines

Ctrl n

From within
the text,
repeats the
last locate.
Starts over
at end of
text

17

Appending and Breaking Lines


Accomplished from within the text
Append:

Position cursor at end of line and type


Break:

Position cursor and press Enter

Enter

18

Modifying Lines
From within the text

Ctrl k
Ctrl l
Join
Join

Deletes to end of line


Opens a line below current line
Position cursor at beginning of line
and press Backspace
Position cursor at end of line and
press Delete

Backspace
Delete
19

Non text-based Commands


From Command-> Prompt
S? Displays size in bytes
! Command Execute jBase Command within
editor

20

Defining and Using Blocks


From within the text
Position the cursor and press
Ctrl g to define the start and end of a block
Position the cursor on appropriate line
and move to the Command-> Prompt
CA
CB
CA4
CB4
MA
MB
DB

Copies block after line you are on


Copies block before line you are on
Copies block after line 4 times
Copies block before line 4 times
Moves block after line you are on
Moves block before line you are on
Deletes block

21

Merging Text
Position cursor on line where you want the merged
lines to follow

From the jed command line, jed the record


containing the lines to be merged
!jed file item
Block (ctrl g) the lines to be merged
From the jed command line type the command
MERGE
The original record will now have the merged lines
22

User Administration

23

Identifying Users

User port
number

User
name

jsh> WHO
Identifies
yourself
24

Monitoring Processes
Unix and jBASE tools are available
WHERE (V

jBASE

jPML options

jBASE

ps ef

Unix

status

Unix
25

WHERE (V

Port
Number

Process
ID

Account
Name

Process
description

Process
Name

26

Monitoring Processes

ps command
process
listing (unix)

status command
shared usage &
network settings

27

Killing a UNIX process


LOGOFF Port_Number is
The safest command for
removing a user
Kill -15 pid
Sends a s/w interrupt to the
selected pid
Kill -9 pid
removes the process
28

jshow
Used to find data files, programs and subroutines
jBASE searching hierarchy is used to locate files
jshow -options name
-a display subroutine names in a shared object
-c display compile time and source file
-f filename search only
-h display help for jshow
-p program name only search
-s subroutine name only search
-v verbose mode

29

COMO
Captures all keyboard input and screen output
to a file

COMO ON name, COMO OFF, COMO DELETE


name
Output is stored as name in the COMO directory
and can be edited

30

Você também pode gostar