Toselectarecord,youcomparethecontentsofoneormorefields(includingresultfields)withoneormorespecifiedvaluestoseeifacondition,ortest,istrue.Forexample,youwantallpersonswiththelastname(LASTNAM)equalto’Clarke’toappearinyouroutput.Test|Field|Value||||||LASTNAMEQ’Clarke’TheSelectRecordsdisplaylistsfieldsyoucanuse(includingresultfields)andasksyoutospecifyyourcomparisons.ThisdisplayisshownbelowwithsomesamplefieldsfromacustomermasterfileshownintheFieldcolumn.©CopyrightIBMCorp.2000,200889
SelectRecordsTypecomparisons,pressEnter.SpecifyORtostarteachnewgroup.Tests:EQ,NE,LE,GE,LT,GT,RANGE,LIST,LIKE,IS,ISNOT...AND/ORFieldTestValue(Field,Number,or’Characters’)__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________Bottom________________________________________________________________________FieldFieldFieldFieldACCTNUMBERSTREETADDRCRLIMITYEARCOMPANYCITYBALDUEMONTHFIRSTNAMESTATEPASTDUEMIDDLEINITZIPCODEDATEPAIDLASTNAMETELENUMBERCURRENTDATBottomF3=ExitF5=ReportF9=InsertF11=DisplaytextF12=CancelF13=LayoutF20=ReorganizeF24=MorekeysNote:Thevalueisnotlimitedtothelengthofthelineontheinputdisplay.Ifyouneedmorespace,continueontothenextline.Youmustseparateallvalueswithblanks.Ifonevalueendsattheendofthelineandyoucontinueontothenextline,youmustincludeablankspacebeforethevalueonthenextline.YoucansplitDBCScharacterconstantsbyplacingaDBCSshift-incharacterinthelastpositionofthefirstlineandaDBCSshift-outcharacterinthefirstpositionofthenextline.Acomparisonhasallofthefollowing:vAfieldtobecomparedvAtestvOneormorevaluestocomparethefieldwithYoucanspecifyuptoamaximumof100comparisons.Eachcomparisoncanuseasmanylines(upto30charactersperline)asneeded,uptoamaximumof100linestotalforallcomparisons.TheSelectRecordsdisplayprovidessixinputlinesatatimeforyoutoentercomparisons.Ifyouneedmorethanthis,pressthePageDownkeytogetmoreblankinputlines.Ifthecursorispositionedonanyoftheinputlines(whetheryouhavetypedacomparisononitornot),youcanusethepagekeystoviewallofthecomparisonsthatyouhaveentered.ComparisonfieldsinQueryfori5/OSInordertobetested,thefieldmustbeoneofthefollowing:vAfieldthatexistsinyourselectedfile(s).Thiscanbeanyfield,includingafieldthatyouhavenotchosentoincludeinyouroutput.vAresultfielddefinedforthisquery.Whenyouspecifyafieldinacomparison,youmustputthefileidentifierfollowedbyaperiodinfrontofanyfieldnamethatappearsinmorethanoneselectedfileinthelist.Forexample,ifthefieldACCTNUMBERexistsintwoofyourselectedfilesthathavefileIDsT01andT02,youwouldhavetospecifyT01.ACCTNUMBERorT02.ACCTNUMBER.Ifyoudidnotincludethefileidentifier,Querywouldnotknowfromwhichfiletogettheaccountnumberneededforthecomparisontest.YoucanpressF18(Files)toseealistofthefilesthatyouselectedandthefileIDassociatedwitheachfile.90Queryfori5/OSV6R1
ComparisonvaluesinQueryfori5/OSThevalueyoucomparethefieldwithcanbe:vAnotherfieldvAnumericconstantvAcharacterconstant(SBCSorDBCS)vAdateconstantvAtimeconstantvAtimestampconstantThefieldandthevalueyouarecomparingmustbecompatibledatatypes.Thefollowingarevalidcomparisonsforrecordselectiontests:vSBCScharacterfieldwith:SBCScharacterDBCS-eitherDBCS-openvDBCS-eitherfieldwith:SBCScharacterDBCS-eitherDBCS-openDBCS-onlyvDBCS-openfieldwith:SBCScharacterDBCS-eitherDBCS-openDBCS-onlyvDBCS-onlyfieldwith:DBCS-eitherDBCS-openDBCS-onlyvDBCS-graphicfieldwith:DBCS-graphicvUCS2-graphicfieldwith:UCS2-graphicvNumericfieldwithanumericfieldvDatefieldwith:SBCScharacterDateDBCS-eitherDBCS-openvTimefieldwith:SBCScharacterTimeDBCS-eitherDBCS-openvTimestamp
Upload your study docs or become a
Course Hero member to access this document
Upload your study docs or become a
Course Hero member to access this document
End of preview. Want to read all 286 pages?
Upload your study docs or become a
Course Hero member to access this document
Term
Summer
Professor
Haulmark
Tags