Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Day 1 - Session 3 - 4 - JQL Commands

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 58

JQL COMMANDS

Day 1 – Session 3 - 4
JQL Commands
Dates
21/02/2011 Tech Support Program
Venue
Microcred, Senagal
JQL

 jBase Query Language (JQL)


• Allows data retrieval from the database in a structured order
• Presents data in a flexible and easily understood format
• Used to process data in the database and to generate reports
• Record selection for processing
– Report formatting
– Sorting
– Data field manipulation capabilities
• Enter JQL statements in the jBase prompt to see how each one
works

2 Thesys Training Centre


JQL commands

 SELECT
• Used to get the count of the given file
• Conditional select can be given
– Eg: SELECT FBNK.CUSTOMER

• Enter LIST to come out of SELECT mode

3 Thesys Training Centre


JQL commands

 SELECT with condition


• Relational operators can be used in conditional Select
• SELECT FBNK.CUSTOMER WITH SECTOR EQ 1001

4 Thesys Training Centre


RELATIONAL OPERATORS

EQ NE

NOT GT

GE LT

LIKE UNLIKE

SAID LE

IS.NULL IS.NOT.NULL

5 Thesys Training Centre


JQL commands

 SSELECT
• Sort select is used to get the selected list in Sorted order

6 Thesys Training Centre


JQL commands

 NSELECT
• NSELECT command is used to get the negated select from the
selected list
• Eg:

– Get the list of customer records in INAU which is not available in


Live file
» SELECT FBNK.CUSTOMER$NAU
» NSELECT FBNK.CUSTOMER

– This will give a list of customers in IANU which is not available in


live file

7 Thesys Training Centre


JQL commands

8 Thesys Training Centre


JQL commands

 QSELECT
• Thiscommand is used to get the count of all multi value fields in
the record
• Eg:

– SELECT FBNK.CUSTOMER.ACCOUNT “100250”


– QSELECT FBNK.CUSTOMER.ACCOUNT

9 Thesys Training Centre


JQL commands

10 Thesys Training Centre


JQL commands

11 Thesys Training Centre


JQL commands

 SAMPLE SELECT
• Selection
on big files take long time. In this case sample select
can be made to get few records quickly
– LIST FBNK.CUSTOMER ONLY SAMPLE 10

12 Thesys Training Centre


JQL commands

13 Thesys Training Centre


JQL commands

 LIST
• Command to list all the records in a file
• This will list all the records with fields and field values
• Eg. LIST FBNK.CUSTOMER

14 Thesys Training Centre


JQL commands

 LIST FBNK.CUSTOMER

15 Thesys Training Centre


JQL commands

 LIST… ONLY
• To list only the ids without fields
• Eg : LIST FBNK.CUSTOMER ONLY

16 Thesys Training Centre


LIST

 LIST FBNK.CUSTOMER ONLY

17 Thesys Training Centre


JQL commands

 LIST (specific fields)


• To list only specific fields in all the records in a file
• Eg.
LIST FBNK.CUSTOMER MNEMONIC SHORT.NAME
NAME.1

18 Thesys Training Centre


JQL commands

 LIST FBNK.CUSTOMER MNEMONIC SHORT.NAME


NAME.1

19 Thesys Training Centre


JQL commands

 NOPAGE
• Thisoption is used to list all the items without pressing Enter
key to go the next page
• LIST FBNK.CUSTOMER MNEMONIC NAME.1 NOPAGE

20 Thesys Training Centre


JQL commands

 Listing of Specific records


• LISTFBNK.CUSTOMER WITH NAME.1 = “SUNN" “SAI"
“BABU“
– List those records whose Name.1 matches the above mentioned
value
• LIST FBNK.CUSTOMER WITH NAME.1 = “SAI" AND WITH
SHORT.NAME= “SAIRAM“
– If both Name.1 and Name.2 matches then only the record will be
retrieved

21 Thesys Training Centre


Listing of Specific records

 LIST FBNK.CUSTOMER WITH NAME.1 = “ABC XZ BANK”

22 Thesys Training Centre


JQL commands

 Soundex Selection
• LIST
FBNK.CUSTOMER NAME.1 WITH NAME.1 SAID
"SUNN“
– Will list only those records which sounds like “SUNN” and the
retrieved value will have ‘S’ as the starting letter

23 Thesys Training Centre


JQL commands

 LIST.ITEM
• This command is used to list all the items in the record
• Eg:

– LIST.ITEM FBNK.CUSTOMER.ACCOUNT
– LIST.ITEM F.JOB.LIST.6

24 Thesys Training Centre


JQL commands

 Listing JOB.LIST.6

25 Thesys Training Centre


JQL commands

 Output of LIST.ITEM command


 LIST.ITEM F.JOB.LIST.6

26 Thesys Training Centre


JQL commands

 SAVE.LIST
• It is possible to save the selected the items and then use it later
• Saved list name should be provided
• This list will get stored in &SAVEDLISTS& folder

27 Thesys Training Centre


JQL commands

 GET.LIST
• This command is used to get the file from &SAVEDLISTS&

28 Thesys Training Centre


JQL commands

 SORT
• By default it will sort in ascending order
• Ifyou want to sort the records in descending order we have to
explicitly mention in the sort statement
• Sort File BY FIELD Fields

29 Thesys Training Centre


JQL commands

 SORT FBNK.CUSTOMER BY NAME.1 NAME.1 NAME.2


• This command will sort the record by Name.1 in ascending order
• Though it is not specified in the sort command by default it will
take ascending order

30 Thesys Training Centre


SORT

 SORT FBNK.CUSTOMER BY NAME.1 NAME.1 NAME.2

31 Thesys Training Centre


JQL commands

 SORT FBNK.CUSTOMER BY-DSND NAME.1 NAME.1


• This
command will sort the record by Name.1 in descending
order

32 Thesys Training Centre


JQL commands

 SORT FBNK.ACCOUNT BY CATEGORY BY SHORT.TITLE


CATEGORY SHORT.TITLE
• This command will sort the record by id and name in ascending
order

33 Thesys Training Centre


JQL commands

 BREAK-ON
• SORTFBNK.CUSTOMER BY SECTOR BREAK-ON SECTOR
NAME.1
– This command will insert a break each time the value in the Break-
On field changes
– (I.e) when the Name.1 changes there will be some spaces between
records

34 Thesys Training Centre


SORT BY Field BREAK-ON Field-Name

35 Thesys Training Centre


JQL commands

 COUNT
• COUNT FBNK.ACCOUNT
• Count is used to count the total number of records in a file

36 Thesys Training Centre


SUPPRESS

 SUPPRESS : ID-SUPP
• Suppress the record ID from being displayed as the first field in
any report
• SORT FBNK.ACCOUNT BY CUSTOMER BREAK-ON "'P'"
CUSTOMER @ID WORKING.BALANCE ID-SUPP
• By default the id of each record will be displayed even if the id
column is not given
• To suppress that id column we have to give Id-Supp

37 Thesys Training Centre


JQL commands

 List without suppress :


• LIST FBNK.STMT.ENTRY AMOUNT.LCY COSNOL.KEY

38 Thesys Training Centre


JQL commands

 List with ID suppress


• LIST
FBNK.STMT.ENTRY AMOUNT.LCY CONSOL.KEY ID-
SUPP

39 Thesys Training Centre


JQL commands

 SUPPRESS : DET-SUPP Details suppress


• SORTFBNK.ACCOUNT BY CATEGORY BREAK-ON
CATEGORY TOTAL WORKING.BALANCE DET-SUPP
• Lists the total working balance for each category without the
account detail
• If DET-SUPP is not given then the command will list all the
account and working balance for each customer along with the
grand total of each category

40 Thesys Training Centre


JQL commands

41 Thesys Training Centre


JQL commands

 ESEARCH
• This command will search the specified string the specified file
• Eg:

– ESEARCH GLOBUS.BP
– STRING:RADAR
– STRING:
– 4 record(s) selected to SELECT list #0

42 Thesys Training Centre


JQL commands

 ESEARCH FBNK.CUSTOMER
 String:? DENORSKE
 String: ?

43 Thesys Training Centre


JQL commands

 SEARCH
• SEARCH is also used to get the search string from file
• This can also search in a specific record
• “*” is used to search in all files

44 Thesys Training Centre


JQL commands

 DELETE.FILE
• This
command is used to delete the records and the entire file
completely
 DELETE.FILE <File-Name>

45 Thesys Training Centre


JQL commands

 DELETE
• This command is used to delete selected records
• “*” can be given to delete all the records

46 Thesys Training Centre


JQL commands

47 Thesys Training Centre


JQL commands

 EDELETE
• Used to delete the records from the file

48 Thesys Training Centre


JQL commands

 CLEAR.FILE
• Used to clear all the records in the file

49 Thesys Training Centre


JQL commands

 LPTR
• Thiscommand is used to store the report in &HOLD& without
display
• This can be used with SETPTR command
– SETPTR 800,800,,,,6,BANNER CUS.LIST1
» Unit Number :0
» Page Width :800
» Page Depth :66
» Top Margin :3
» Bottom Margin :3
» Print mode : 6 - Output to HOLD file ( CUS.LIST1 )

50 Thesys Training Centre


JQL commands

 SETPTR 800,800,,,,6,BANNER CUS.LIST1


 LIST FBNK.CUSTOMER ONLY LPTR

51 Thesys Training Centre


JQL commands

 The output will be available in &HOLD& with the file name


CUS.LIST1
 Find the path of &HOLD& from VOC

52 Thesys Training Centre


JQL commands

53 Thesys Training Centre


JQL commands

 DBL-SPC
• This command is used to give double space between the lines
• LIST
FBNK.CUSTOMER NAME.1 SECTOR NATIONALITY
DBL-SPC

54 Thesys Training Centre


JQL commands

 WILD CARD CHARACTERS


“ ^ “
– This can be used as a wild card character in queries
– Eg: LIST FBNK.CUSTOMER = ‘100^89’ ONLY

55 Thesys Training Centre


JQL commands

“[ “
– This can be used for left ignore
– Eg : LIST FBNK.CUSTOMER = ‘[00289’ ONLY

56 Thesys Training Centre


JQL commands

“ ] ”
– This can be used for right ignore
– Eg : LIST FBNK.CUSTOMER = ‘10029]’ ONLY

57 Thesys Training Centre


Summary

 We have learnt about the


• Various Jbase tools & utilities commands
• Features of JED
• Navigation in Editor
• Features of JQL

58 Thesys Training Centre

You might also like