1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When...

79
Conversion Team Thursday, February 21, 2013 Creating a Basic Query 1. Choose option i5 Query Option. 2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining a query. 2 Change- Changes an existing query definition. The Define the Query display is shown for this option also. 3=Copy- Copies an existing query definition. The Copy Queries display is shown. 4=Delete- Deletes an existing query definition. The Confirm Delete of Queries display is shown. 5=Display- Shows the definition of a query without being able to change it. (To change the query, choose option 2.) The Define the Query display is shown. 6=Print definition- Prints a query definition. 8=Run in batch- Runs a query in batch, reducing the resource drain caused by running the query interactively.

Transcript of 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When...

Page 1: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

Creating a Basic Query

1. Choose option i5 Query Option.

2. Choose which Option you would like to perform.

1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining a query.

2 Change- Changes an existing query definition. The Define the Query display is

shown for this option also.

3=Copy- Copies an existing query definition. The Copy Queries display is shown.

4=Delete- Deletes an existing query definition. The Confirm Delete of Queries

display is shown.

5=Display- Shows the definition of a query without being able to change it. (To change the query, choose option 2.) The Define the Query display is

shown.

6=Print definition- Prints a query definition.

8=Run in batch- Runs a query in batch, reducing the resource drain caused by running the query interactively.

Page 2: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

9=Run Runs a query. Query displays a report, prints a report, or puts the data into a Database file, depending on what is specified in the query definition.

3. Query- This field is the name of a query already created. Clicking the will provide a list of

existing queries.

4. Library- Is a place on the system to store objects, including the query definitions and files that

you use in Query for iSeries. Therefore, when you are working with queries and files,

you may need to specify the library where a query or file is stored. Clicking the

icon will provide a list of existing libraries. CAUTION NEVER USE THE

FNPDAT LIBRARY.

5. Once you have chose your options click OK to continue.

6. Click OK.

Page 3: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

7. Click the icon to provide a list of Libraries to choose from. You will likely only use

FNPDAT. Click the icon to provide a list of files to choose from. For definitions of the

files press f11. Use the to page up and down in the list. Highlight the file needed and

click Select. Most commonly used files are listed below. Click OK to continue or f9 to add an

additional file (this is more of an advanced query). Clicking Ok to accept the selection and

return to the main query menu.

DDMAST- Deposit Master file.

LNMAST- Loan Master file.

GLMAST- General Ledger Master file.

SBMAST- Safe Deposit Box Master file.

CSMAST- Customer Information Master file.

Page 4: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

8. Highlight the Select and sequence field’s option. Click Select. This option is where you choose

what information you would like to show on your query and the order of the information.

Page 5: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

9. Type sequence numbers next to the fields to be on the report. Start with the number and 5 and

use increments of fives to allow adjustments to the report if necessary. For training purposes let

select the fields listed below. Once the selections have been chosen click OK. Your screen

should look like the example below. Click OK to return to the main query menu.

Account number

Customer name

Product

Current balance

Account status

10. Highlight Select records option and click Select. This option allows you to set certain

conditions.

Page 6: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

11. Enter the field, test and value of the condition to be use. For training purposes we want all

accounts with a status of A and are in the product P01 Regular Checking. Below are the

definitions of the test options and how to enter the information.

Test Description

EQ Equal. Use this test to determine if the contents of the field and the value are equal.

NE Not equal. Use this test to determine if the contents of the field and the value are not

equal.

GT Greater than. Use this test to determine if the contents of the field is greater than the

value.

LT Less than. Use this test to determine if the contents of the field is less than the

value.

GE Greater than or equal. Use this test to determine if the contents of the field is greater

than or equal to the value.

LE Less than or equal. Use this test to determine if the contents of the field is less than

or equal to the value.

RANGE Range. Use this test to determine if the contents of the field is within a range

that you have specified for the value.

LIST List. Use this test to determine if the contents of the field is equal to one of the

values in a list.

NLIST Not List. Use this test to determine if the contents of the field is not equal to any

of the values in a list.

LIKE Like. Use this test to determine if the contents of the field has a pattern similar to

the value.

NLIKE Not Like. Use this test to determine if the contents of the field has a pattern that

is not similar to the value.

IS Is. Use this test to determine if a field is null. The only valid value is NULL or null. ISNOT Is not. Use this test to determine if the contents of the field is not null.

Page 7: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

12. Highlight the Select sort field’s option and click Select. This option is used to sort the

information by a particular field.

13. Enter the sort priority in increments of 5 if sorting by more than one field again allowing for

changes if necessary. For training purposes we will sort by the Account number field and in

ascending order. Click OK to confirm the selection. Click OK again to accept the selection and

return to the main query menu. Below is an example of how the screen will look.

Page 8: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

14. Highlight the Select report summary functions option and click Select. This is where you can

summarize field in your query. For training purposes we will total the current balance field.

Below are the selections for summarizing and how your screen should look. Click OK to return

to the main query menu.

1=Total

2=Average

3=Minimum

4=Maximum

5=Count

Page 9: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

15. Highlight the Define report breaks option and click Select. We are not going to use this option

for training purposes but this is where you could separate the information on the report by a

particular field.

16. Highlight the Select output type and output form and click Select. This option is how you

would like your report to be outputted. Do you want to just display, print or create a database.

For training purpose we will print since this is the most commonly used option.

Page 10: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

17. Click the circle next to Printer. Form of output defaults to Detail but if you just want the report

to be summarized click Summary only. Click OK.

18. Enter the network printer in the Printer field. Click OK.

Page 11: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

19. Enter a Y in the Spool the output field. Click OK.

20. If you want a Cover page title to print select Y and then type the information in the fields

provided. If you are writing a query to be created for CSPI reports you must select Yes. Click

OK.

Page 12: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

21. If you would like a header at the top of your report select Y and enter the information in the

fields provided. Click Ok to return to the main query menu.

22. The query is now completed. Press f3 to complete the output and whether the query is to be

saved for future use. Choose Yes to Save or No not to Save. Choose the Run Option. Run

interactively will print the query immediately, Run in batch is to create a database and Do not

fun will not run the query but if you chose to save the query it will be saved. Next you need to

define or name the query. This is a name that you create but you are limited to the number of

characters allowed. Text is where you can enter a title of the query for searching purposes on

saved queries. Press enter. You now have completed the creation of a query.

Page 13: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Conversion Team Thursday, February 21, 2013

Page 14: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

Cardinal Software Change your core experience

Cardinal Software Cardinal/400

Most Commonly Used

Data File Listing

Page 15: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

2

www.cardinal400.com

Cardinal/400 Data Files ............................................................................................................3

Trademark Attributions ……………………………………………………………………………..11

Page 16: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

3

Cardinal/400 Data Files

The following is a list of some of the most commonly used files in the Cardinal/400 system. Frequently used files by users are in “bold” for easy identification.

File Name Description ACBANK ACH bank master record

ACBNKS ID’s for all banks on system

ACCASHD Cash Management master physical file

ACCOID ACH company ID file

ACCOMP ACH company file

ACDESC EFT transaction description

ACEFTA EFT transfer master addenda file

ACEFTC EFT transfer check file

ACEFTM EFT transfer master file

ACENOT ACH and EFT notice exception file

ACFEDR ACH Fed return file

ACMAST ACH master file

ACPARC Cash Management parameter file

ACPARL ATM terminal ID parameter file

ACPARW Transfer/Fees parameter

ACPAR2 ACH Transaction code parameter file

ACPAR3 ACH Transaction code translation file

ACSAVI Saved copy of ACH input files

BKAREF Account to account relationship file

BKBANK Bank information file

BKBRCH Branch file

BKCARD Cardinal/400 software level file

BKCHCK Check reconciliation master file

BKCHKM Accounts on check recon

BKCITY Common cities file

BKCLAS Classification parameter file

BKCLCY Processing calendar Cycle file

BKCLDR Processing calendar

BKCTRN Check recon paid checks transaction file

BKEGRP E-mail group file

BKEMPR Employer parameter file

BKESEL E-mail group selection file

BKFSTP Inquiry Fast Path File

BKINQH Inquiry history file

BKLDOC Letter selection parameter file

BKMACT Menu system account selection file

BKMAIL Mail parameter file

BKMANT On-line maintenance history file

BKMBNK Menu system bank file

Page 17: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

4

File Name Description BKMBRN Menu branch selection file

BKMCAT Management category codes

BKMDET Management detail codes

BKMDEV Menu system device file

BKMHIS Menu system history file

BKMLVL Account/Customer level management code

BKMMNU Menu system menu file

BKMNSF Authorization to Close/Open NSF online

BKMOPT Menu system option file

BKMSEC Menu system security file

BKMUSR Menu system user file

BKNARR_D Deposit & Loan Narratives (Detail)

BKOFFR Bank officer parameter file

BKOLINM Todays on-line maintenance file

BKPARA ALM parameter file

BKPARB Regulatory code parameter file

BKPARC CRA code parameter file

BKPARD Account type description parameter file

BKPARG FR2900 parameter file

BKPARH Special handling parameter file

BKPARI Interest base codes

BKPARM Menu system user defaults file

BKPARN Special display program authority file

BKPARP Help programs to display

BKPARR Region codes

BKPARU Misc user codes parameter file

BKPARY City code parameter file

BKPCAT Profile category codes

BKPLVL Profile account/customer level codes

BKPRAT Pending master rate changes

BKPSEL Parameter maint online display selection

BKPTRAN Pending Transaction File

BKRATE Bank master rate file

BKRATEB Branch rates

BKRATER Regional rates

BKRAUD Report distribution programs/reports

BKRDST Report distribution end point file

BKREGN Region file

BKREGO Insider file

BKREXT Report distribution extra selections

BKRFRM Report distribution form definition

BKRGLT Report distribution selections today

BKRHIS Rate history file

BKRPGM Report distribution programs/reports

BKRSEL Report distribution selection file

Page 18: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

5

File Name Description BKRSELC Report distribution selection code file

BKRTDY Report distribution selections today

BKSCYC Statement cycle parameter file

BKSDSA Special display program authority file

BKSDSP Special display parameter file

BKSICC Standard industry codes

BKSTAT State parameter file

BKSTPR Step rate account file

BKTHIS Transactions by user for today’s history

BKTMAN Today’s online maintenance file

BKTNEW New customers/accounts today

BKTRAN Cross application transaction entry file

BKTSEC Account type security by user ID

BKUHIS User inquiry history file

BKUINF User information file

BKUINQ User inquiry password file

BKWITH Withholding reasons file

CSADDN Additional names at account level file

CSADOF Additional officers file

CSADSN Additional short name file for CIS

CSALTA Alternate address account level file

CSALTG Account level alternate greeting

CSAREF Account reference file

CSCNTC Customer contact file

CSCNTD Customer contact descriptions file

CSCREF Customer to customer reference file

CSMAST CIS master file

CSMESG CIS message file

CSNOTS Notices omit file by customer/account

CSPARF Financial Statement parameter file

CSPARN Notice selection parameter file

CSPARQ Customer inquiry code parameter file

CSPARR CIS relationship parameter file

CSPARS Statement form parameter file

CSSADD Seasonal address file

CSSTMR Statement rate change history

DDAARL Account analysis related accounts

DDAHIS A/A variable charges month ending record

DDAMON Account analysis month ending record

DDCVRY Check verification requests file

DDEXCP Daily deposit exception file

DDFHIS Deposit float history file

DDFLOT Deposit float file

DDHIST Deposit transaction history file

DDHOLD Deposit hold file

Page 19: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

6

File Name Description DDIDST IRA distribution file

DDITC2 IRA transaction code parameters

DDMAST Deposit master file

DDMEMO Deposit memo transactions

DDMEND Deposit month end record

DDNSFD NSF on-line reentry detail file

DDNSFH NSF history file

DDNSFM NSF reentry master file

DDNSFS NSF on-line status

DDNSFTM NSF todays maintenance file

DDODPD ODP transfer detail file

DDOLIN Deposit online reentry detail file

DDPARA A/A variable charges parameter file

DDPARB Age basis bonus parameter file

DDPARC Club accounts parameter file

DDPARD Positive pay company codes file

DPARE Positive pay authorization codes file

DDPARG Deposit service charge parameter file

DDPARI IRA agreement code parameter file

DDPARL Overdraft limits parameter file

DDPARO Deposit online withdrawals parameters

DDPARP Early W/D penalty parameters

DDPARR IRA code parameter file

DDPARS Deposit soft service charge parameter

DDPARW Deposit fee parameter

DDPAR0 Deposits date information

DDPAR1 Deposit product parameter file

DDPAR2 Deposit transaction code parameter file

DDPBAL Deposit preposting balance file

DDRDSP Return item disposition codes

DDRHIS Deposit rate change history by account

DDRITM Return item checks

DDRREA Return item reason codes

DDRRUL Return item general rules and parameters

DDRSRC Return item source

DDSMSG Deposit statement message parameter

DDSSEL Deposit statements selected for print

DDSTOP Stop payment file

DDSWMP Sweep primary master file

DDTHIS Deposit daily history file

DDTOTG Deposit G/L group total file

DDTRAN Deposit transaction File

GLAPAA A/P alternate address file

GLAPCK A/P checks file

Page 20: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

7

File Name Description GLAPCR A/P credit memo file

GLAPIN A/P invoice file

GLAPSO A/P invoice standing orders file

GLAPVN Accounts payable vendor master file

GLBUDG G/L budget records

GLCHRT G/L charge of accounts file

GLCNRA Reporting center ratio account level

GLCNTA Reporting center account level file

GLCNTD Reporting center detail file

GLCNTL Reporting center line detail file

GLCNTM Reporting center master file

GLCNTP Reporting center preselected file

GLCNTR Reporting center ratio file

GLDTRF G/L daily transfer accounts file

GLEXCP G/L daily exception file

GLGINT G/L group interface code file

GLHIST G/L history file

GLMAST G/L master file

GLMEMO G/L memo transactions and remarks

GLMEND G/L month ending records

GLMNET G/L monthly net income file

GLOUTQ G/L report distribution report file

GLPARA A/P main parameter file

GLPARG G/L group code parameter file

GLPARI G/L interface code parameter file

GLPAR0 G/L processing dates file

GLPAR1 G/L application level parameter file

GLPAR2 G/L transaction code parameter file

GLRECA G/L recurring transactions master file

GLTHIS Daily posted transaction history file

GLTRAN General ledger transaction file

INEXCP Investment daily exception file

INHIST Investment transaction history file

INMAST Investment master file

INMEND Investment month ending record

INPARB Investments repricing grid

INPARD Investments dealer parameter file

INPARL Investments legal opinions parameter

INPARR Investments ratings parameter file

INPARS Investments safekeeping parameter file

INPARV Investments valuation parameter file

INPAR0 Investments processing dates

INPAR1` Investment product level parameter file

INPAR2 Transaction code parameter file

Page 21: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

8

File Name Description

INRHIS Investments rate change history

INTHIS Investments todays transactions

INTOTG Investments G/L group total file

INTRAN Investment transaction file

LNABIL Loan A/R billing file

LNAREC Loan accounts receivable file

LNBILL Loan billing file

LNCDOC Collateral documents tracking file

LNCFIP FIP county codes

LNCOLL Collateral tracking file

LNDBRB Dealer to bank rebate file

LNEANL Loan escrow analysis file

LNEBILL Loan escrow billing file

LNENAM Loan escrow distribution parameter file

LNESCH Escrow analysis projection history

LNESCW Loan escrow account level records

LNESIR Loan escrow irregular payment schedule

LNEXCP Loan daily exception file

LNFDIC FDIC loan file

LNHIST Loan transaction history

LNLDET Line of credit loan detail file

LNLEND Loan limited endorsement file

LNLMST Credit line/commitment master file

LNMAST Loan master file

LNMEMO Loan memo transactions and remarks

LNMEND Loan month ending file

LNOLIN Loans online reentry detail file

LNPARA Loan purpose parameter file

LNPARB Loan collateral pricing grid parameter

LNPARC Loan collateral parameter file

LNPARCB Credit bureau account types

LNPARD Loan department parameter file

LNPARE Loan credit rating code parameter file

LNPARF Loan watch list code parameter file

LNPARG Classified loan code parameter file

LNPARH Credit bureau report header information

LNPARI Loan dealer to bank rebate parameter

LNPARK Loan penalty interest parameter

LNPARM Loan cost of funds parameter

LNPARN Loan collateral document parameter file

LNPARP Loan payment types parameter file

LNPARR Loan risk code parameter file

LNPARS Loan prepayment penalty parameter file

LNPART Loan participation file

Page 22: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

9

File Name Description

LNPARU Loan collateral appraisal code parameter

LNPAR0 Loan date information

LNPAR1 Loan product parameter file

LNPAR2 Loan transaction code parameter file

LNPNAM Participation code parameter file

LNREBT Loan account level rebate file

LNRHIS Loan rate change history by account

LNSCHD Loan irregular payment schedule

LNSFIP FIP state code parameter

LNSSEL Loan selected statements for today

LNTHIS Loan today’s history transactions

LNTOTG Loan G/L group total file

LNTRAN Loan transaction file

MSMAST Memo account master file

MSPARA Memo pipeline loan parameter file

MSPAR1 Memo product parameter file

SBEXCP Safe deposit box daily exception file

SBHIST Safe deposit box transaction history

SBMAST Safe deposit box master file

SBMEND Safe deposit box month end record

SBPARB Safe deposit box all boxes parameter file

SBPARR Safe deposit box rental amount parameter file

SBPAR1 Safe deposit box product parameter file

SBPAR2 Safe deposit box transaction code parameter file

SBRSTC Safe deposit box restricted access file

SBTHIS Safe deposit daily transaction history

SBTOTG Safe deposit box G/L Group total file

SBTRAN Safe deposit box transaction file

SHDIVH Shareholder stock dividend history

SHEXCP Daily shareholder exception file

SHHIST Shareholder history for batch entry

SHMAST Shareholder master file

SHMEND Shareholder month end record

SHPAR1 Stock class parameter file

SHPAR2 Shareholder transaction code parameter file

SHSPEC Special stock dividend file

SHTDIV Dividends paid today

SHTHIS Shareholder daily history file

SHTOTG Shareholder G/L interface totals

SHTRAN Shareholder transaction file

TXAREC Payer/Transmitter “A” record

TXARECBR Payer/Transmitter “A” record – by branch

TXBOND Window transactions file

TXBREC Payee “B” record

Page 23: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

10

File Name Description

TXPAR1 Bank level tax reporting parameter file

TXTREC Transmitter “T” record

TXTRECBR Transmitter “T” record – by branch

Page 24: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal400® System Documentation © 2009 Cardinal Software, Inc. All rights reserved.

11

Trademark Attributions

The following trademarks are referenced in this document:

Cardinal/400® is a registered trademark of Cardinal Software, Inc. in the United States and/or other

countries.

Page 25: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Creating/Editing/Running Advanced Queries

Michelle Haskin

Page 26: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Query

Joining Files Dates Result fields Select & Sequence fields Select records Select sort fields Specify report column formatting Select report summary functions Define report breaks Select output type & form

Page 27: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Navigation-Cardinal.com

Click the item you wish to edit/view F5 will display data while working with the query;

Click on Function/Report. F10 will go back one screen and will save the

information on the current screen; Click on Function/Process Previous.

F12 will go back one screen and will ignore any changes made to the current screen.

F13 will display layout of data; Click on Function/Layout.

Page 28: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Navigation-Cardinal.com

F19 will display the next group – i.e. the field list for the next file. (This function is available on all screens applicable to entering field names.) Click the function tab to see all function

keys available.

Page 29: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Navigation Green Screen

Key 1 beside the menu item you wish to edit/view F5 will display data while working with the

query. F10 will go back one screen and will save the

information on the current screen. F12 will go back one screen and will ignore

any changes made to the current screen. F13 will display layout of data.

Page 30: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Navigation Green Screen

F19 will display the next group – i.e. the field list for the next file. (This function is available on all screens applicable to entering field names.) Watch the bottom of your screen for the

function keys available on each screen. F24 means there are more function keys available, pressing F24 will toggle you through the different groups of keys.

Page 31: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files

There are 3 ways to join fields. 1=Matched records. By selecting this all files

must have a matching record. If there is not a matching record in ALL files, the record from the primary file will not be selected.

Ex: If you joined the DDMAST with DDSTOP using this method ONLY the accounts that have a stop pay would be available for this query.

All information from both files are available in this query.

Page 32: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files

2=Matched records with primary file. By selecting this, all records in the primary file will be selected and all records in subsequent files that have a match will be joined.

Ex: If you joined DDMAST with DDSTOP using this method all deposit accounts, will be available in this query.

All fields in the DDSTOP file would be blank for those accounts that do not have a stop.

Page 33: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files

3=Unmatched records. By selecting this option only records in the primary file that do not have a match in all subsequent files will be displayed.

For example: Joining DDMAST and DDHOLD using this method would select only accounts that do not have a hold.

Page 34: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files

You must define the account fields that are used to join a file. You must select at least two fields, one from each file. Fields must be the same format in both

files, ie numbers must be joined with numbers and alpha joined with alpha. Field names must be proceeded with a 1 –

3 character identifier, such as T01, T02, T03 (default); or A, B, C

Page 35: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files

You can use more than one test to join two files, such as account number and account type.

You can specify up to 100 join tests. For a matched record join, if one or both fields

are null, the records are not joined. You can specify *ALL to join to files, this will

result in all records in the first file being joined with all records in the second file. This is useful when adding the processing date to a file.

Page 36: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files

Sequencing Secondary Files for a Primary Join. • Using type 2 or 3 means there is one primary

file and the rest is secondary. • Order of files is important if joining more than

2 files. • Use join tests to connect each secondary file

to a file listed above it. You may join file A to file B, then join file A to file C or you may join file A to file B then join file B to file C.

Page 37: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files

Sometimes the order of the files and the join field can cause duplicate entries.

You can usually correct this by joining multiple fields for two files and/or changing the order of the join. Such as DDMAST and DDMEND.

Example if you have a DDA and a SAV with same account number. If you join only account number, you will get two records for the DDA and two records for the SAV for each month end record.

Page 38: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files-Matched

To join LNMAST with CSAREF:

Page 39: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files - Matched

Page 40: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files – Matched

Page 41: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files – Matched with Primary

Joining LNMAST with LNMEND

Page 42: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files – Matched with Primary

Page 43: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files – Matched with Primary

Page 44: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files - *ALL

Page 45: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files - *ALL

Page 46: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files - *ALL

Page 47: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Joining Files

Questions????

Page 48: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

Cardinal stores 2 dates: • 1 MMDDYY • 2 Julian date: YYYYxxx

xxx = the actual day of the year, for example: January 31, would be 2009031 June 30, would be 2009181 (June 30 is the 181st day

of the year – if not a leap year.)

Page 49: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

When selecting a date range it is best to use Julian date. Invest in a date calculator. You can use Cardinal’s date calculator to

get the Julian date. You can use Results Fields to calculate

time frames for selecting data.

Page 50: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal Date Calculator

When using the date calculator in Cardinal to calculate the Julian date, remember to always start with December 31, 20xx, place the date you wanting to calculate in the end date and click okay. In the following example, you can see that January 31, is 031. The date calculator calculates the number of days from the day you start with to the end date, it does not count the beginning date. In other words, it counts the next date as day one (1).

Page 51: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Cardinal Date Calculator

Page 52: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Terms in Result Fields

Numeric expressions + - / *. Character expressions

• SUBSTR selects specific digits of a field • !! Concatenation-adds fields or portions of a field (if

used with substr) together. Note: When using Cardinal.com Pikes are represented by the

exclamation (!) key, in a green screen they are represented by the pike (|). In the examples used here we are using the !.

• DIGITS Returns a character representation of a number

• VALUE Returns the first argument that is not null.

Page 53: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Terms in Result Fields

Date expressions • + / - Adds/subtracts days, months, years, to a field. • CHAR Returns a character representation of a date. • DATE Returns a date from a value • DAY Returns the day part of a value • DAYS Returns a numeric representation of a date. • MONTH Returns the month part of a value • YEAR Returns the year part of a value • CURRENT Returns the current date

Page 54: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Result Fields Explanations Numeric Expressions: You can add (+), subtract (-), divide (/) or multiply (*). For example, if you are working with month end records you can divide the aggregate

balance by the number of days in the month to obtain an average balance. DDMEND DMLEDM / DMDAYM would result in the average ledger balance for the

month. DMLEDM = aggregate ledger balance DMDAYM = aggregate days. You might think that you could just use DMLEDM / 30 (for November) but that would

result in an incorrect average for the accounts that had been opened/closed during the month. The aggregate days for a new account start on the day they are opened. The aggregate days for a closed account start on the day that it closes.

It is also a good idea to use the aggregate days so if you change the month end you want to pull data for, you do not have to remember to change the calculations as well.

Late Charges Due is a field that is not stored in LNMAST, but rather needs to be calculated by taking the Late Charges Assessed minus the Late Charges Paid. Expression would be LCASS – LCPAD.

Page 55: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Result Fields Explanations SUBSTR = Substring This function is used to extract specific data from a field. The syntax is: SUBSTR(field name, beginning position of data, length of data). Example: CSMESG file, I want to know all messages that start with the

word Alternate because I have alternate addresses stored in messages and now I want to move them to the proper place in CIS. I would take the message text 1 field and pull out the first nine (9) characters of the field:

SUBSTR(CMTXT1,1,9) would pull out the first 9 characters, then on the select records screen I could select my new field EQ ‘Alternate’. This would have to be an exact match. Later we will explore some other ways to get this data when it’s not an exact match.

Page 56: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Result Fields Explanations SUBSTR is very useful when working with dates to compare. It can be

used along with Concatenate to extract certain parts of a date field. The new field can then be used to automate a number of date operations.

To use the SUBSTR function, you must be working with a character field. If the field is not a character field, such as a date field (ex:Maturity Date), you can convert it to a character field by using the DIGITS or CHAR function.

Digits will convert a number to a character string. CHAR will convert the current date/timestamp field to a character string. Note: dates used in Cardinal use the Digits function because they are

formatted numerically. The date here refers to a specifically formatted date field. IBM’s date

function that returns the current date would use the CHAR function. There are a number of examples where we will use substring with

concatenate later in this training.

Page 57: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Terms in Result Fields

Concatenate function gives you the ability to add two or more fields together, multiple substring’d fields or a fixed character/number to a field.

For example the rate variance and rate variance code are stored separately in DDMAST. You could add these field together by using the Concatenate (!!) function. DIGITS(VARY) !! VARCOD (00025000+).

You could also make the rate and term one field with a space by using the following DIGITS(TERM) !! ‘ ‘ TRMCOD. Note: there is one space between the apostrophes which will cause a space to print between the term and term code (012 M).

Page 58: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

Result Fields • CDATE CURRENT(DATE) + 1 YEAR • MATDATE DATE(DIGITS(MATD7)) CDATE would result in 12/1/10 (ran on 12/1/09)

Select Fields • MATDAT LE CDATE This would result in selecting all records with a maturity

date less than or equal to 1 year 12/1/10.

Page 59: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

Page 60: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

Page 61: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

Page 62: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

Result Fields • CDATE CHAR(CURRENT(DATE) – 5 DAYS) • CDATE1 SUBSTR(CDATE,1,2)!!

SUBSTR(CDATE,7,2) • ENTDAT DIGITS(A.ENTD6) • ENTDAT1 SUBSTR(ENTDAT,1,2)!! SUBSTR(ENTDAT,5,2) CDATE = 11/26/09 CDATE1 = 1109 (ran on 12/1/09) ENTDAT = 110609 ENTDAT1 = 1109

Select Fields • ENTDAT1 EQ CDATE1

This would allow you to automate a query and select the previous months data, such as entered date for new accounts, a month end record, last months/quarters history, etc.

Page 63: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

Page 64: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

Page 65: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

Page 66: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Dates

Page 67: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Selecting Records

You can select records by comparing to another field or to a value/constant.

Operandi are as follows: • EQ Equal NE Not Equal • GT Greater than GE Greater than or Equal to • LT Less than LE Less than or Equal to • RANGE The field being tested falls on or between these values • LIST The field being tested is one of the listed values. • NLIST The field being tested in not one of the listed values. • LIKE The field being tested has a pattern similar to the value. • NLIKE The field being tested does not have a patter similar to the

value. • IS The field is tested to see if it is null. • ISNOT The field is tested to see if it is not null.

Page 68: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Select and Sequence Fields This is the screen that you select the fields you want to appear on your

report and you select the sequence you want them printed.

Page 69: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Select and Sequence Fields

You can re-number the fields by: • Pressing Shift F8 • Clicking on Function/Renumber

You can position to the next group by: • Pressing Shift F7 • Clicking on Function/Next Group

Page 70: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Other Options

Select Sort Fields • Select the sort order for your data, such as

branch, then product then account number. Specify Report Column Formatting

• Allows you to change standard headings and spacing of fields.

Select Report Summary Functions • Allows you to total, average, minimum,

maximum and count items in a field.

Page 71: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Other Options

Defining Report Breaks • You can insert breaks and subtotals for

certain groups of items, such as branch, officer, product. You can assign a break level to either page break or just break (same page)

• The sort priority is designated in the sort field above. You must first select sort order then break order based on sort order.

Page 72: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Sort Order

Page 73: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Break Options

Page 74: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Break Options

You have the option to suppress summaries on the final totals:

Page 75: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Break Options You can skip to a new page at the break (in this example when the branch changes). You can also insert break text. Note: by using the &fieldname, it will insert the field text. In this

example the total would be ‘Branch 01 totals’ followed by the total.

Page 76: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Break Options You have the option to set a different break format for each break level. You can set to skip a

page or not and to suppress the summaries or not.

Page 77: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Break Options You could choose suppress the product totals.

Page 78: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Other Options

Select Output Type and Output Form • Select file, report or display output. • Select a specific printer or *PRINT. • Select forms type. • Select number of copies. • Select line spacing and wrapping. • Select cover page and text for cover page. • Select standard headings.

Page 79: 1.2. Choose which Option you would like to perform. 1 Create- Creates (defines) a new query. When this option is processed, the Define The Query display is shown so you can start defining

Query!!

Resources: • http://www.elink.ibmlink.ibm.com/publications/

servlet/pbi.wss?CTY=US&FNC=SRX&PBL=SC41-5210-04#

• Other users • Cardinal • Internet – Search iSeries Query