59
AS400 Introduction In AS400, AS stands for "Application System”. It is multiuser, multitasking and very secure system and hence is used for the industry which requires sensitive data to be stored and processed simultaneously. It has integrated the DB2 database management system, menu-driven interfaces, multi-user support, security, communications, client–server and web-based applications. It is best suited for mid-level industry and hence is used in pharmaceutical industry, banking, malls, hospital administration, manufacturing, distribution industry, financial organization, e-commerce etc. The AS/400 (Application System/400) was first introduced by IBM on June 21st, 1988 and later renamed to as eServer iSeries in 2000, then in 2006, it was renamed as System i . In 2008 System igot unified with System p to become Power system. The operating system for AS400 also got renamed with the rebranding. Initially, it was OS/400 theni5/OS and then iBM i (Power system). OS/400 Version 4, introduced a feature LPAR (Logical PARtitioning) which facilitates running multiple operating systems simultaneously on one IBM System i unit ensuring that one OS doesn’tinterfere other’s system resources/memory. Programming languages available for the AS/400 include RPG, assembly language, C, C+ +, Pascal,Java, Perl, Smalltalk, COBOL, SQL, BASIC, PHP, P ython. AS400 is based on Layered machine architecture. It enables user to move to new hardware technology at any time, without disrupting their application programs. It has Object orientation i.e. everything that can be stored or retrieved on the system is known as an“objects”.

AS400 Introduction

Embed Size (px)

DESCRIPTION

as400 introduction

Citation preview

AS400 IntroductionIn AS400, AS stands for"Application System.It is multiuser, multitasking and very secure system and hence is used for the industry which requires sensitive data to be stored and processed simultaneously.It has integratedtheDB2database management system, menu-driven interfaces,multi-usersupport, security, communications, clientserver and web-based applications.It is best suited formid-level industryand hence is used in pharmaceutical industry, banking, malls, hospital administration, manufacturing, distribution industry, financial organization, e-commerce etc.The AS/400 (Application System/400) was first introduced byIBMon June 21st, 1988 and later renamed to aseServer iSeriesin 2000, then in 2006, it was renamed asSystem i .In 2008System igot unified withSystem pto becomePower system.The operating system for AS400 also got renamed with the rebranding. Initially, it wasOS/400theni5/OSand theniBM i(Power system).OS/400 Version 4, introduced a featureLPAR(LogicalPARtitioning) whichfacilitates running multiple operating systems simultaneously on one IBM System i unit ensuring that one OS doesntinterfere others system resources/memory.Programming languages available for the AS/400 includeRPG,assembly language,C,C++,Pascal,Java,Perl,Smalltalk,COBOL,SQL,BASIC,PHP,Python.AS400 is based on Layered machine architecture. It enables user to move to new hardware technology at any time, without disrupting their application programs.It has Object orientation i.e. everything that can be stored or retrieved on the system is known as anobjects. AS400 can recognize only the object types that have been defined for it. It cannot identify any unknown objects that dont seem to be known. It adds extra security to the system.It provides contiguous memory between main storage and disk storage. It provides authority to add any disk space so that use.Another feature of AS400 is that it is very secure system making it to store sensitive data. It incorporates security at various levels. Any user can be limited to access/process only particular information on thesystem.

LibraryWhen we execute a command or call a program, the AS/400 must know where to find the command or program and the answer is library.A Library is a collection of objects.QSYS is the only library that contains other library.A library contain the object name, type, and the addressQSYS is the root library where the entire user defined/ system defined library is created.System library is the library that contains the objects that was created at the time OS400 was installed.System supplied libraries begin with the letter "Q" or "#".When you logon the first library to be load is QSYS. The system library is loaded at the first time.Library list types:System library: All IBM supplied library e.g. QSYS, QHLPSYS, QUSRSYSProduct Library: Whenever Ibm product is used it is added to the library automatically and is removed itself whenthe job completes.Current Library: Current library is the working library i.e. all the work done by you is stored in current library. If you want that all the things done by you should be stored in your personal library AMINEM , then just change the current library as your personal library.To change current library to your personal library AMINEM:CHGCURLIBAMINEMUser Library: Non-IBM supplied i.e. created by the user.

Related commands:I.Display Library List (DSPLIBL)To display all types of libraries, we can use the command:In the below snapshot we can see different types of library in the library liste.g. SYS(system), CUR(current), USR(user) library.Display Library ListSystem:USALID09Type options, press Enter.5=Display objects in libraryASPOptLibraryTypeDeviceTextQSYSSYSSystem LibraryQSYS2SYSSystem Library for CPI'sQHLPSYSSYSQUSRSYSSYSSystem Library for UsersAMINEMCURQGPLUSRGeneral Purpose LibraryQTEMPUSRLOADUSRFuture Three - LOAD Procedure & UpdateMore...F3=ExitF12=CancelF17=TopF18=Bottom

II.Create Library (CRTLIB)To create library the command is:CRTLIBIROBO1Press F4Type choices, press Enter.

Library . . . . . . . . . . . . IROBO1 NameLibrary type . . . . . . . . . . *TEST (*PROD, *TEST)Text 'description' . . . . . . . THIS IS IROBO'S TEST LIBRARY

BottomF3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=CancelF13=How to use this display F24=More keys

Library type (TYPE)*PRODDatabase files in production libraries cannot be opened for updating if a user is in debug mode and he requested that production libraries be protected.A user can protect all database files in production libraries from updates by specifying *NO for the Update production files (UPDPROD) parameter on the Start Debug (STRDBG) command to begin testing. However, this protection does not prevent the program from deleting database files or from changing other objects (such as data areas) in the library.*TESTThis is a test library. All objects in a test library can be updated during testing, even if special protection is requested for production libraries.III.Display library (DSPLIB)DSPLIB IROBO1It gives you the information of all objects that resides in the library with itssize.Display LibraryLibrary. . . . . . :IROBO1Number of objects. :8Type . . . . . . . . :PRODLibrary ASP number . :1Create authority . . :*EXCLUDELibrary ASP device . :*SYSBASType options, press Enter.5=Display full attributes8=Display service attributesOptObjectTypeAttributeSizeTextPRINT1PGM*PGMRPGLE131072rpgle program for priACCOUNT*FILEPF49152ACCOUNT RELATED INFORPRINT1*FILEPRTF4096PRINTER DDS RLU GENERQCLSRC*FILEPF8192Sources CL-ProgramsQDDSSRC*FILEPF8192DDS-SourcenQRPGLESRC*FILEPF69632QRPGLESRC2*FILEPF65536QRPGSRC*FILEPF8192SOURCE PHYSICAL FILEBottomF3=ExitF12=CancelF17=TopF18=Bottom

IV.Edit Library List (EDTLIBL)You can add your personal library to any position just update the sequence no. 0 with the required where you want your library to be and the corresponding library name.Edit Library ListSystem:PUB1Type new/changed information, press Enter.SequenceSequenceSequenceNumberLibraryNumberLibraryNumberLibrary015030010GAMES40016031020QGPL17032030QTEMP180330401903405020035060210360702203708023038090240390

V.Add Library List Entry (ADDLIBLE)ADDLIBLE LIB(IROBO1) POSITION(*First)It adds your personal library at the first position in the library list.VI.Work With Libraries Using PDM (WRKLIBPDM)Sourcephysical fileSource physical file is a filewhich contains the sources of different types of objects.Command used is CRTSRCPF.CRTSRCPFFILE(IROBO1/QRPGSRC) RCDLEN(112) TEXT('SOURCE PHYSICAL FILE)There can be up to 32767 members.Source physical file is anobject. But the source member is not an object. When we compile the member, theobject is created for that source.To see all thesource members of a source physical file, the command used isWRKMBRPDM.Work with MembersUsing PDMPUB1File.. . . . .QRPGLESRCLibrary . . . .IROBO1Position to. . . . .Type options, press Enter.2=Edit3=Copy4=Delete 5=Display6=Print7=Rename8=Display description9=Save13=Change text14=Compile15=Create module...OptMemberTypeTextACCOUNTPFACCOUNT RELATED INFORMATIONPRINT1PRTFPRINTER DDS RLU GENERATEDPRINT1PGMRPGLErpgle program for print1BottomParameters or command===> ________________________________________________________________________________________________________________________________________________________F3=ExitF4=PromptF5=RefreshF6=CreateF9=RetrieveF10=Command entryF23=More optionsF24=More keysTo add source ofany type of object in a source physical file we use the commandWRKMBRPDMand then F6.Structure of the source physical file:128012Serial no./DateSource of the memberComment

If you want tocheck the structure do the runqry to check it:RUNQRY QRYFILE ((QRPGLESRC *LAST))Display ReportPosition to line. . . . .Shift to columnLine....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+...1SRCSEQSRCDATSRCDTA0000011.00121,019FPRINT1oEPRINTEROFLIND(*IN90)0000022.00121,019FACCOUNTIFEK DISK0000033.00121,019CZ-ADD*ZEROSCOUNT2 00000044.00121,019CWRITEHEADER10000055.00121,019CWRITEHEADER20000066.00121,019CREADREC1800000077.00121,019CDOW*IN80=*OFF0000088.00121,019CWRITEDETAIL900000099.00121,019C90WRITEHEADER200001010.00121,019CEVALCOUNT=COUNT+100001111.00121,019CREADREC18000001212.00121,019CENDDO00001313.00121,019CEVALTOTAL=COUNT00001414.00121,019CWRITEFOOTER00001515.00121,019CSETONLR****** ********End of report********System defaultlength of Source physical file92Recommendedlength of Source physical file112**Note:If we are copying thesource code from one source file of length 112, we must assure that the targetsource file must be of length 112, else the source code will be truncated.Other than WRKMBRPDM, we can get the detail of Source physical fileby command DSPFD.Related commandsI.Display FileDescription (DSPFD)DSPFDIROBO1/QRPGLESRCThe command given information:It is a source physical file in library IROBO1.Its creation date.Detail of each and every member(ACCOUNT,PRINT1,PRINTPGM) as in abovesnapshot.File Level Identifier:It is actually the timestamp that relate to creation date/time ofsource file.Member Level Identifier:It is actually the timestamp that relate to creation date/time ofMembers.File/Member Level Identifiers are used by operations such as RSTOBJ tohelp avoid restoring files that are the wrong versions.Record FormatLevel Identifiers:are hashes ofattributes of all of the fields in the format. Attributes such as lengths andbuffer positions are hashed in order to generate a nearly unique value.A difference betweenFormat Level Identifiers in a program and in a file will result in a "levelcheck" exception when the program attempts to open the file.Initial no. of records:Initially what is the no. of records(Here it is 10000)Increment no. of record:Indicates, what should be the number of times the increment willhappen.(Here it is 1000)Maximum no. of increment:Indicates, what should be the increment factor by which therecord will increase.(Here it is 499)Record capacity:Hence, on the basis of above three, themaximum no. of record could be 10000+499*1000=509000 i.e. given as recordcapacity below.Current number of records:Current no.of record for each member.No. of format=01Total record length :112In the bottom summary of all members.Display Spooled FileFile.. . . . :QPDSPFDControl . . . . .Find.. . . . .*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.12/31/12Display File DescriptionDSPFD Command InputFile. . . . . . . . . . . . . . . . . . . : FILEQRPGLESRCLibrary . . . . . . . . . . . . . . . . .:*LIBLFile Description HeaderFile. . . . . . . . . . . . . . . . . . . : FILEQRPGLESRCLibrary . . . . . . . . . . . . . . . . . .:IROBO1Type of file. . . . . . . . . . . . . . . :PhysicalFile type . . . . . . . . . . . . . . . . .: FILETYPE*SRCAuxiliary storage pool ID . . . . . . . . .:00001Data Base File AttributesExternally described file . . . . . . . . .:YesFile level identifier . . . . . . . . . . .:1121019191538Creation date . . . . . . . . . . . . . . .:10/19/12Maximum members . . . . . . . . . . . . . .: MAXMBRS*NOMAXNumber of constraints . . . . . . . . . . .:0Number of triggers. . . . . . . . . . . . :0Number of members . . . . . . . . . . . . .:3Member sizeSIZEInitial number of records . . . . . . . .:10000Increment number of records . . . . . . .:1000Maximum number of increments. . . . . . :499Record capacity . . . . . . . . . . . . . .:509000Coded character set identifier. . . . . . : CCSID273Initial number of records . . . . . . .:10000Increment number of records . . . . . .:1000Maximum number of increments. . . . . :499Current number of increments. . . . . . :0Record capacity . . . . . . . . . . . . .:509000Current number of records . . . . . . . .:8Number of deleted records . . . . . . . .:0Starting journal receiver for apply . . .:Member. . . . . . . . . . . . . . . . . . : MBRPRINT1Member level identifier . . . . . . . . .:1121019191550Member creation date. . . . . . . . . . :10/19/12Text 'description'. . . . . . . . . . . : TEXTPRINTER DDS RLU GENERATEDExpiration date for member. . . . . . . : EXPDATE*NONEMember sizeSIZEInitial number of records . . . . . . .:10000Increment number of records . . . . . .:1000Maximum number of increments. . . . . :499Current number of increments. . . . . . :0Record capacity . . . . . . . . . . . . .:509000Current number of records . . . . . . . .:66Number of deleted records . . . . . . . .:0Record Format ListRecordFormat LevelFormatFieldsLengthIdentifierQRPGLESRC31122A4BA13FFF687Text . . . . . . . . . . . . . . . . . . .:Total number of formats. . . . . . . . . . :1Total number of fields . . . . . . . . . . .:3Total record length. . . . . . . . . . . . :112Member ListSourceCreationLast ChangeDeletedMemberSizeTypeDateDateTimeRecordsRecordsACCOUNT8192 PF10/19/12 10/19/12 19:15:5080Text:ACCOUNT RELATED INFORMATIONPRINT116384 PRTF10/19/12 10/19/12 19:17:53660Text:PRINTER DDS RLU GENERATEDPRINT1PGM8192 RPGLE10/19/12 10/19/12 19:15:50150Text:rpgle program for print1Total number of members. . . . . . . . . :3Total number of members not available. . :0Total records. . . . . . . . . . . . . . :89Total deleted records. . . . . . . . . . :0Total of member sizes. . . . . . . . . . :32768Note:The information can be filtered based on the TYPE attribute:*MBR,*ACCPTH,*MBRLIST,*RCDFMT,*MBR.DSPFD FILE(IROBO1/QRPGLESRC) TYPE(*MBRLIST)Display Spooled FileFile. . . . . :QPDSPFDControl . .. . .Find. . . . . .*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+.12/31/12DisplayFile DescriptionDSPFDCommand InputFile. . . . . . . . . . . . . .. . . . . : FILEQRPGLESRCLibrary . . . . . . . . . . . . . . . . . :IROBO1Type ofinformation . . . . . . . . . . . . : TYPE*MBRLISTFileattributes . . . . . . . . . . . . . . : FILEATR*ALLSystem. . . . . . . . . . . . .. . . . . : SYSTEM*LCLFileDescription HeaderFile. . . . . . . . . . . . . .. . . . . : FILEQRPGLESRCLibrary. . . . . . . . . . . . . . . . . . :IROBO1Type offile. . . . . . . . . . . . . . .:PhysicalFiletype . . . . . . . . . . . . . . . . . : FILETYPE*SRCAuxiliary storage pool ID . . . . . . . . . :00001MemberListSourceCreationLast ChangeDeletedMemberSizeTypeDateDateTimeRecordsRecordsACCOUNT8192PF10/19/12 10/19/12 19:15:5080Text:ACCOUNT RELATEDINFORMATIONPRINT116384PRTF10/19/12 10/19/12 19:17:53660Text:PRINTER DDS RLUGENERATEDPRINT1PGM8192RPGLE10/19/12 10/19/12 19:15:50150Text:rpgle program forprint1Totalnumber of members. . . . . . . . .:3Totalnumber of members not available. .:0Totalrecords. . . . . . . . . . . . . .:89Totaldeleted records. . . . . . . . . .:0Total ofmember sizes. . . . . . . . . . :32768V

Physical fileIt is a file which. Contains the data in predefined structured format.Its type PF. By usingCRTPFcommand to create PF.Maximum number of fields included in a PF is 8000.Maximum no of key fields included is 120.The structure of the PF is given below:PHYSICAL FILE INTERNAL STRUCTURETYPE SPECIFIC ATTRITIBUTE

TYPE INDEPENDENT ATTRIBUTE

RECORD FORMAT

KEYED ACCESS PATH

RECORDS

TYPE SPECIFIC ATTRIBUTE: Specific to its typeTYPE INDEPENDENT ATTRIBUTE: Creation date, author, size, expiration detailKEYED ACCESS PATH: An area within a physical file obj where key field data is stored in the order along with their RRNLevels of entries in physical fileColumns . . . :171BrowseAMINEM/DDSSRCSEU==>ACCOUNTFMT PF .....A..........T.Name++++++RLen++TDpB......Functions++++++++++++++++++*************** Beginning of data *****************************0001.00AUNIQUE>>>>> FILE LEVEL0002.00AR ACCOUNT>>>>> RECORD FORMAT LEVEL0003.00AACLEVELID2P 00004.00AACORGCOD3P 0>>>>> FIELD LEVEL0005.00AACCOUNTNUM12P 00006.00AACCURRENCY3A0007.00AACNAME20A0009.00AK ACLEVELID0010.00AK ACORGCOD>>>>> KEYFIELD LEVEL0011.00AK ACCOUNTNUM0012.00AK ACCURRENCY****************** End of data ********************************I.File level entries (optional):File level entries give the system information of the entire file. UNIQUE, LIFO, FIFO, FCFO, REF are the keywords used at file level.UNIQUE:A record cannot be entered or copied into a file if its key value is same as the key value of a record already existing in the file.FIFO:The duplicate key records will retrieved in first in first out order.LIFO:The duplicate key records will retrieved in last in first out order.FCFO:The duplicate key records will retrieved in first changed first out order.REF:This keyword is used to specify the name of the file from which thefields are taking definition.II.Record format level entries:For aPFthe record format name is specified along with an optional text description. The record level entries can beFORMAT, TEXT.FORMAT:This record-level keyword specifies that the record format being define is to share the field specifications of a previously defined record format. The name of the record format being defined must be the name of the previously defined record format.The format of this keyword is:FORMAT (LIB-NAME / FILE-NAME)TEXT:This record level keyword is used to supply a text description of the record format and it is used fordocumentation purposes only.The format of this keyword is:TEXT (description)III.Field level entries:The field names and field lengths are specified along with and optional text description for each field.(ALIAS, ALWNULL, CCSID, CHECK, CHKMSGID, CMP, COLHDG, COMP, DATFMT, DATSEP, DFT, EDTCDE, EDTWRD, REFFLD, REFSHIFT, TEXT, TIMEFMT, TIMESEP, VALUES, VARLEN)IV.Key field level entries:The field names used as key fields are specified.(DESCEND, SIGNED, ABSVAL, UNSIGNED, ZONE, NOALTSEQ, DIGIT)File level keywords FIFO, LIFO, FCFOFIFO: The duplicate key records will retrieved in first in first out order.LIFO: The duplicate key records will retrieved in last in first out order.FCFO: The duplicate key records will retrieved in first changed first out order.When the FIFO, FCFO, or LIFO keyword is not specified, no guaranteed order isspecified for retrieving records with duplicate keys.No specific order for duplicate key fields allows more access path sharing, which can improve performance.Arranging duplicate keys:If you do not specify the Unique (UNIQUE) keyword in data description specifications (DDS), you can specify how the system stores records with duplicate key values.You specify that records with duplicate key values are stored in the access path in one of the following ways:Last-in-first-out (LIFO):When the LIFO keyword is specified, records with duplicate key values are retrieved in LIFO order by the physical sequence of the records. Here is an example of DDS using the LIFO keyword.ALIFOAR REC2A.A.A.AK EMPNOAssume that a physical file has the FIFO keyword specified (records with duplicate keys are in FIFO order), and that the following table shows the order in which records were added to the file.Order in which records were added to fileKey value

1A

2B

3C

4C

5D

The sequence of the access path is FIFO, with ascending key values.

Records 3 and 4, which have duplicate key values, are in FIFO order. That is, because record 3 was added to the file before record 4, it is read before record 4.This would become apparent if the records were read in descending order. This can be done by creating a logical file based on this physical file, with the DESCEND keyword specified in the logical file.The sequence of the access path is FIFO, with descending key values.Record numberKey value access order

5D

3C

4C

2B

1A

If the key value of physical record 1 is changed to C, the sequence of the access path for the physical file is FIFO, with ascending key values.Record numberKey value access order

2B

1C

3C

4C

5D

Finally, changing to descending order, the new sequence of the access path for the logical file is FIFO, with descending key values.Record numberKey value access order

5D

1C

3C

4C

2B

After the change, record 1 does not appear after record 4, even though the contents of the key field were updated after record 4 was added.The FCFO order of records with duplicate key values is determined by the sequence of updates made to the contents of the key fields. In the preceding example, after record 1 is changed such that the key value is C, the sequence of the access path is FCFO, with ascending key values only.Record numberKey value access order

2B

3C

4C

1C

5D

File level keywords REFUSE OF REFERENCEColumns . . . :171BrowseAMINEM/DDSSRCSEU==>REFERFMT PF .....A..........T.Name++++++RLen++TDpB......Functions++++++++++++++++++*************** Beginning of data *************************************0002.00AR REF0003.00ARAC12P 0COLHDG('LEVEL ID')0004.00ARAC23P 0COLHDG('ORG CODE')0005.00ARAC312P 0COLHDG('ACCOUNT NUM')0006.00ARAC43ACOLHDG('ACCOUNT CURRENCY')0007.00ARPOSTCODE2P 0COLHDG('POST CODE')0008.00ARCOUNTRY3P 0COLHDG('COUNTRY CODE')0009.00ARNAME20ACOLHDG('NAME')0010.00ARDATE3P 0COLHDG('DATE')****************** End of data ****************************************Now we can refer the file REFER to take the field definition in the new file.Columns . . . :171BrowseAMINEM/DDSSRCSEU==>USEREFFMT PF .....A..........T.Name++++++RLen++TDpB......Functions++++++++++++++++++*************** Beginning of data *************************************0002.00AREF(REFER)0003.00AR USEREF0004.00AACCLVLRREFFLD(RAC1 REFER)>>>>>>field name and0005.00ALIAS(ACC_LVL_ID)referred file name0007.00AACCORGRREFFLD(RAC2 REFER)0008.00ALIAS(ACC_ORG_CODE)0009.00AACCNUMRREFFLD(RAC3 REFER)0010.00ALIAS(ACC_NUM)0011.00AACCCURRREFFLD(RAC4 REFER)0012.00ALIAS(ACC_CUR)0013.00AACCNAMERREFFLD(RNAME REFER)0014.00ALIAS(ACC_NAME)****************** End of data ****************************************Both(COLHDG & ALIAS) are used to identify fields. COLHDG &ALIAS is the Description of fields. The difference is that in ALIAS we can access data based on that ALIAS name, while COLHDG is not allowed. Suppose in PF field name as DES78, give ALIAS as Description78, then user can access data from using Description78.Related CommandCreate Physical File (CRTPF)CRTPF FILE(AMITNEM/OBJ) SRCFILE(AMINEM/QDDSSRC) SRCMBR(OBJ_SRC)The above command is similar to taking option-14 against the source member in member PDM(WRKMBRPDM).If there is any data in the physical file and you are using CRTPF/option-14, then all the data in the physical file will be lost.Change Physical File (CHGPF)CHGPF FILE(AMITNEM/OBJ) SRCFILE(AMINEM/QDDSSRC) SRCMBR(OBJ_SRC)If you dont want to lose the data, but you want to compile the source member, then you can achieve this by CHGPF command.We generally use CHGPF to change the attribute which are highlighted below.Change Physical File (CHGPF)Type choices, press Enter.Physical file. . . . . . . . .NameLibrary. . . . . . . . . . .*LIBLName, *LIBL, *CURLIBSystem . . . . . . . . . . . . .*LCL*LCL, *RMT, *FILETYPESource file. . . . . . . . . .*NONEName, *NONELibrary. . . . . . . . . . .Name, *LIBL, *CURLIBExpiration date for member . . .*SAMEDate, *SAME, *NONEMaximum members. . . . . . . .*SAMENumber, *SAME, *NOMAXAccess path size . . . . . . . .*SAME*SAME, *MAX4GB, *MAX1TBAccess path maintenance. . . .*SAME*SAME, *IMMED, *REBLD, *DLYAccess path recovery . . . . . .*SAME*SAME, *NO, *AFTIPL, *IPLForce keyed access path. . . .*SAME*SAME, *NO, *YESMember size:Initial number of records. .*SAME1-2147483646, *NOMAX, *SAMEIncrement number of records.*SAME0-32767, *SAMEMaximum increments . . . . . .*SAME0-32767, *SAMEMaximum file wait time . . . . .30Number, *SAME, *IMMED, *CLSMaximum record wait time . . . .60Number, *SAME, *IMMED, *NOMAXShare open data path . . . . . .*SAME*SAME, *NO, *YESMax % deleted records allowed.*NONE1-100, *NONE, *SAMEReuse deleted records. . . . .*YES*SAME, *YES, *NOSort sequence. . . . . . . . .*HEXName, *SAME, *SRC, *JOB...BottomF3=ExitF4=PromptF5=RefreshF12=CancelF13=How to use this displayF24=More keysCan LEVEL CHECK ERROR occur if we do CHGPF?It depends on the value that we have set for LVLCHK (Record format level check) attribute.If its value is *YES then the record format level identifier is checked when the file is opened and if it doesnt match it throws the error.If its value is *NO, then the record format level identifier is not checked, hence no error.CHGPFMChange Physical File Member (CHGPFM)Type choices, press Enter.Physical file. . . . . . . . . > MASTERNameLibrary. . . . . . . . . . . >AMINEMName, *LIBL, *CURLIBMember . . . . . . . . . . . . . > *FIRSTName, *FIRSTSource type. . . . . . . . . .*NONEName, *SAME, *NONEExpiration date for member . . .*NONEDate, *SAME, *NONEShare open data path . . . . . .*NO*SAME, *YES, *NOText 'description' . . . . . . .'ACCOUNT RELATED INFORMATION'BottomF3=ExitF4=PromptF5=RefreshF12=CancelF13=How to use this displayF24=More keysDisplay file description(DSPFD)It is used to display the details about the file.Display file field description(DSPFFD)It is used for listing details about individual fields.Reorganize physical file member(RGZPFM)We generally use RGZPFM to reuse the deleted records of a file for future insert operation. The data in a file in inserted sequentially. If we delete some in between records, then those freed spaces wont be used for inserting new record. Like this, the toll of space accumulated by deleted records goes on and we cannot use them until and unless we run RGZPFM command to reorganize the space.Once we delete the records the relative record number of the records gets changed due to reorganization of file.Suppose a file is used in most of the programs based on its key value. If we want to change the access path of this file from sequential to keyed or from one key value to another key value, then we can go for RGZPFM.Example:Below records are according to arrival sequence.ACCOUNTORGACCCCYPARTY000001 190A00000000001CCYP00000000001000002 191A00000000002EURP00000000002000003 192A00000000003USDP00000000003000004 192A00000000004TRYP00000000004000005 190A00000000005INRP00000000005000006 190A00000000006TRYP00000000006000007 192A00000000007INRP00000000007000008 191A00000000008GBPP00000000002000009 191A00000000009USDP00000000001000010 195A00000000010EURP00000000003000011 193A00000000011TRYP00000000005000012 192A00000000012EURP00000000002000013 190A00000000013EURP00000000009000014 191P00000000014USDP00000000004000015 192A00000000015INRP00000000010000016 192A00000000016GBPP00000000011000017 192A00000000017AZKP00000000017000018 191A00000000018EURP00000000014000019 190P00000000019EURP00000000015Now we want to arrange the records according to the key value(ORG/ACC/CCY) of file ACCOUNT. For this we set theKEYFILE = *FILE.If we want to arrange the records based on some other key value then we can give the logical file name containing that key value.Reorganize Physical File Mbr (RGZPFM)Type choices, press Enter.Data base file . . . . . . . . . FILE>ACCOUNTLibrary. . . . . . . . . . .>QGPLMember . . . . . . . . . . . . . MBR>ACCOUNTKey file:KEYFILELogical file . . . . . . . . .> *FILE>>>>>>>>>>>Library. . . . . . . . . .Member . . . . . . . . . . . .Rebuild access paths . . . . . . RBDACCPTH*YESAllow cancel . . . . . . . . . . ALWCANCEL> *NOAdditional ParametersSource update options. . . . . SRCOPT*SAMEAfter reorganizing, the records in ACCOUNT get arranged as per the key value of ACCOUNT.ORGACCCCYPARTY000001 190A00000000001CCYP00000000001000002 190A00000000005INRP00000000005000003 190A00000000006TRYP00000000006000004 190A00000000013EURP00000000009000005 190P00000000019EURP00000000015000006 191A00000000002EURP00000000002000007 191A00000000008GBPP00000000002000008 191A00000000009USDP00000000001000009 191A00000000018EURP00000000014000010 191P00000000014USDP00000000004000011 192A00000000003USDP00000000003000012 192A00000000004TRYP00000000004000013 192A00000000007INRP00000000007000014 192A00000000012EURP00000000002000015 192A00000000015INRP00000000010000016 192A00000000016GBPP00000000011000017 192A00000000017AZKP00000000017000018 193A00000000011TRYP00000000005000019 195A00000000010EURP00000000003TO CHECK THE MEMBER OF A PHYSICAL FILE:We give the source physical file name as the physical file for which we want to see the member.Work with Members Using PDMSYSTEM09File. . . . . .ACCOUNTLibrary . . . .AMINEMPosition to. . . . .Type options, press Enter.3=Copy4=Delete5=Display7=Rename8=Display description9=Save13=Change text18=Change using DFU25=Find string ...OptMemberDateTextACCOUNT05/21/12>>>> ACCOUNT member inside ACCOUNT physical fileBottomParameters or command===> ________________________________________________________________________________________________________________________________________________________F3=ExitF4=PromptF5=RefreshF6=CreateF9=RetrieveF10=Command entryF23=More optionsF24=More keysBelow if the data in the ACCOUNT member of file ACCOUNT.ACCOUNT/ACCOUNTACLEVELIDACORGCODACCOUNTNUMACCURRENCYACNAME0000017190100,000,000,001EURSURESH0000027190100,000,000,002EURSHRI0000037190100,000,000,003EURUPI0000047190100,000,000,004EURABHI0000057190100,000,000,005EURAMI0000067190200,000,000,002EURJAPY0000077190200,000,000,003USDKAPIL0000087190200,000,000,004USDTQNGOTO ADD A NEW MEMBER TO THE FILE USINGADDPFMPRESS F6Add Physical File Member (ADDPFM)Type choices, press Enter.Physical file. . . . . . . . . > ACCOUNTNameLibrary. . . . . . . . . . . >AMINEMName, *LIBL, *CURLIBMember . . . . . . . . . . . . .________NameText 'description' . . . . . . .*BLANKBottomF3=ExitF4=PromptF5=RefreshF10=Additional parametersF12=CancelF13=How to use this displayF24=More keysADDPFM FILE(AMINEM/ACCOUNT) MBR(MBR2)Member MBR2 added to file ACCOUNT in AMINEM.STRDFU => SELECT member as MBR2 to add record in the new member.Work with Members Using PDMSYSTEM09File. . . . . .ACCOUNTLibrary . . . .AMINEMPosition to. . . . .Type options, press Enter.3=Copy4=Delete5=Display7=Rename8=Display description9=Save13=Change text18=Change using DFU25=Find string ...OptMemberDateTextACCOUNT05/21/12MBR207/23/12>>>>>>> New member MBR2 added to the file ACCOUNTBottomParameters or command===> ______________________________________________________________________________________________________________________________________________________________F3=ExitF4=PromptF5=RefreshF6=CreateF9=RetrieveF10=Command entryF23=More optionsF24=More keysACCOUNT/MBR2ACLEVELIDACORGCODACCOUNTNUMACCURRENCYACNAME0000017190200,000,000,001EURHIMESH0000027190200,000,000,002USDSUKIN0000037190200,000,000,004USDSANKY0000047190200,000,000,005CHFPAINKTO ADD A NEW MEMBER TO THE FILE USINGCPYFCPYF FROMFILE(AMINEM/ACCOUNT) TOFILE(AMINEM/ACCOUNT) FROMMBR(ACCOUNT) TOMBR(MBR3) MBROPT(*ADD) CRTFILE(*NO) FROMRCD(1) NBRRCDS(3)Member MBR3 added to file ACCOUNT in AMINEM.3 records copied from member ACCOUNT.MEMBER WILL BE CREATED AND RECORD WILL BE ADDED TO THIS MBR.Work with Members Using PDMSYSTEM09File. . . . . .ACCOUNTLibrary . . . .AMINEMPosition to. . . . .Type options, press Enter.3=Copy4=Delete5=Display7=Rename8=Display description9=Save13=Change text18=Change using DFU25=Find string ...OptMemberDateTextACCOUNT05/21/12MBR207/23/12MBR307/23/12>>>>>>> New member MBR2 added to the file ACCOUNTBottomParameters or command===>F3=ExitF4=PromptF5=RefreshF6=CreateF9=RetrieveF10=Command entryF23=More optionsF24=More keysCopy memberWork with Members Using PDMNLAAB441File. . . . . .PRJ1Library . . . .AMINEMPosition to. . . . .Type options, press Enter.2=Edit3=Copy4=Delete 5=Display6=Print7=Rename8=Display description9=Save13=Change text14=Compile15=Create module...OptMemberTypeText_3_MASTERPFACCOUNT RELATED INFORMATIONMENUCCLPTO CALL MENUMNU0MNUDDSMNU0QQMNUCMDOPT1_PGMRPGentry pgm to be called for option-1OPT2_PGMRPGentry pgm to be called for option-2OPT3_PGMRPGLEentry pgm to be called for option-3OPT4_PGMSQLRPGLEentry pgm to be called for option-4More...Parameters or command===>F3=ExitF4=PromptF5=RefreshF6=CreateF9=RetrieveF10=Command entryF23=More optionsF24=More keysCopy MembersFrom file . . . . . . . :PRJ1From library. . . . :AMINEMType the file name and library name to receive the copied members.To file . . . . . . . .PRJ1Name, F4 for listTo library. . . . .AMINEMTo rename copied member, type New Name, press Enter.MemberNew NameMASTERMASTERBottomF3=ExitF4=PromptF5=RefreshF12=CancelF19=Submit to batch

Top of FormLogical fileLogical file does not occupy any memory.One or more logical file can be derived from a single physical file.It simply contains the record selection definition and when accessed retrieves the records from the physical file to which it refers.A logical file can contain up to 32 record formats.It selects records dynamically. It cannot exist without a physical file.We can filter the data with criteria by usingselectandomitcommand.A logical file does not contain any data but provides the VIEWS of the data to satisfy end-users needs.Types of Logical fileThere are two types:1)Non-join logical file2)Join logical file1)Non-join logical fileNon-join logical files can either be a simple logical file, which contains only one record format or a multiple record format logical file, which contains more than one Record format.Logical files can be derived from 1 to 32 physical files and so a logical file can have a maximum of 32 record formats.Single record format Non-join logical file:If a logical file is derived from single physical file it is called simple logical file.Columns . . . :171BrowseAMINEM/DDSSRCSEU==>MULTIFRMTFMT LF .....A..........T.Name++++++.Len++TDpB......Functions++++++++++++++++++*************** Beginning of data *************************************0002.00AR ACCOUNTPFILE(AMINEM/ACCOUNT)0003.00AK ACCOUNTNUM0005.00AK ACCURRENCYMultiple record format Non-join logical file:Multiple record non-join logical files will select records from 2 or more physical files by referring to only one logical file.Each record format is always associated with one or more physical file.The same PF can be used in more than one record format.Columns . . . :171BrowseAMINEM/DDSSRCSEU==>MULTIFRMTFMT LF .....A..........T.Name++++++.Len++TDpB......Functions++++++++++++++++++*************** Beginning of data *************************************0002.00AR ACCOUNTPFILE(AMINEM/ACCOUNT)0003.00AK ACCOUNTNUM0005.00AK ACCURRENCY0006.00AR TRANSPFILE(AMINEM/TRANS)0007.00AK TACCOUNT0008.00AK TCURRENCY****************** End of data ****************************************Levels of entries in Logical fileColumns . . . :171BrowseAMINEM/DDSSRCSEU==>FILTERFMT LF .....A..........T.Name++++++.Len++TDpB....Functions++++++++++++++++++*************** Beginning of data *************************************0001.0ADYNSLT>>>>>>>>>>>>>> File Level0002.00AR LOG1FILE(AMINEM/ACCOUNT)>>> RecordLevel0005.00AACCOUNTNUM0006.00AACCURRENCY>>>>>>>>>>>>>>>>>>> Field Level0009.00AK ACCOUNTNUM0010.00AK ACCURRENCY0011.00AS ACCOUNTNUMCMP(GT 100000000001)>> Selection/0017.00AO ACCOUNTNUMCMP(GT 100000000003)Omission Level****************** End of data ******************************************1. File-level entries (optional): (REFACCPTH, DYNSLT)REFACCPTH: The access path information for this logical file is to be copied from another PF or LF.Format of the keyword is:REFACCPTH(LIB name / DATABASE name)DYNSLT: Use this file-level keyword to indicate that the selection and omission tests specified in the file (using select/omit specifications) are done at processing time. This keyword specifies dynamic select/omit rather than access path select/omit.Only a Physical file contains data. Logical files just contain pointers for processing the data in a specific sequence and/or subset of data.When a record is added/changed/deleted in a physical file, the system has to put a lock on it and then go out to check and update any logical files before it can release the lock. While the amount of time to do this is hardly measurable, it can be significant if massive batch updates are done to a file.If you are using the Select/Omit option in your DDS and using DYNSLT, the above process does not need to be done atrecord update time.Where this is beneficial is when your selection process includes almost all the records in the file. Now when you process using DYNSLT, it will read all the records in the file, but do the selection of which recordsto processat that time rather than having done all the maintenance ahead of time.Difference between access path and Dynamic selectDynamic select occurs whenever the program reads file. But access path occurs before the file is read (but not necessarily).2. Record level entries (PFILE)PFILE: The physical files containing the data to be accessed through theRecord formats being defined.Format of the keyword is:PFILE (LIB name / PF name)3. Field-level entries (optional)4. Key field level entries (optional)5. Selection/Omission level entries (optional)SELECT / OMIT KeywordColumns . . . 1 71EditAMINEM/EXAMPLESEU==> SELOMITFMT PF.*************** Beginning of data *******************0001.00R RECSEL0002.00EMPNO5P 00003.00EMPNAME20A0004.00K EMPNO****************** End of data ************************EMPNOEMPNAME000001 1001SHRI000002 1002ABHI000003 1003SHRI000004 1004UPI000005 1005ABHI000006 1006SHRI000007 1007ABHI000008 1008UPI000009 1009SHRI000010 1010UPI****** ******** End of report********Columns . . . 1 71EditAMINEM/EXAMPLESEU==> SELOMILFFMT LF...*************** Beginning of data *********************0001.00R RECSELPFILE (SELOMIT)0002.00K EMPNO0003.00S EMPNOCMP (GT 10003)0004.00O EMPNAMECMP (EQ 'SHRI')****************** End of data **************************EMPNOEMPNAME000001 1002ABHI000002 1004UPI000003 1005ABHI000004 1006SHRI000005 1007ABHI000006 1008UPI000007 1009SHRI000008 1010UPI****** ******** End of report********Columns . . . 1 71EditAMINEM/EXAMPLESEU==> SELOMITFMT PF.*************** Beginning of data *******************0001.00R RECSEL0002.00EMPNO5P 00003.00EMPNAME20A0004.00K EMPNO****************** End of data ************************EMPNOEMPNAME00000120SHRI00000230RAM00000340JYOTI00000450AMI00000560SHRI00000670SHRI00000780JYOTI00000890JYOTI000009100SHAMNT****** ******** End of report********Columns . . . 1 71EditAMINEM/EXAMPLESEU==> SELOMILF1FMT LF*************** Beginning of data ************************0001.00R RECSELPFILE (SELOMIT1)0002.00K EMPNO0003.00S EMPNOCMP (GT 50)0004.00S EMPNAMEVALUES ('SHRI')****************** End of data **************************EMPNOEMPNAME00000120SHRI00000260SHRI00000370SHRI00000480JYOTI00000590JYOTI000006100SHAMNT****** ******** End of report********2)Join logical fileA join-logical file is a logical file that combines two or more PF. i.e. master + transactional record.A PF cannot be changed through a JLF.DFU cannot be used to display a JLF.Only one record format can be specified in a JLF.Commitment control cannot be used with a JLF.Key fields must be fields defined in the join record format and must be fields from the PRIMARY FILE.Entries in join logical file:1. File-level entries (optional): (JDFTVAL)2. Record-level entries: (JFILE)3. join-level entries (JOIN, JFLD, JDUPSEQ)4. fieldlevel entries (optional): (JREF, ALL, CONCAT, DYNSLT, RENAME, SST, TRNTBL)5. Key field level entries (optional)6. Select and Omit field level entries. (Optional)JFILE:It is similar to indicate that this is a join logical field and it must have more than 2 physical files.JOIN:It is similar that this file level entries to be representthe position of the files .There mustone primary file and can havemore than I secondary files.JFLD:Which feels we are going to join.JREF:Represents the primary file reference fieldJDUPSEQ:This joinlevel keyword is used to specify the order in which records with duplicate join fields are presented when the JLF is read.The format for this keyword is:JDUPSEQ (Sequencing field-name [*DESCEND])This keyword has no effect on the ordering of records with unique keys.If *DESCEND is not specified then the default is sequencing in ascending order.Example:JDUPSEQ (Sequencing Duplicate Objects)Columns . . . 1 71EditAMINEM/EXAMPLESEU==>SEQ1FMT PF.*************** Beginning of data ***********************0001.00R SEQREC10002.00EMPNO5P 00003.00EMPNAME120A0004.00ADDRESS20A0005.00K EMPNO****************** End of data **************************EMPNOEMPNAME1ADDRESS000001 10,001BOB23,OLD MADIWALA000002 10,002DANNY50,LONGISLAND000003 10,003PRINC90,ATTUR****** ******** End of report********Columns . . . 1 71EditAMINEM/EXAMPLESEU==>SEQ2FMT PF*************** Beginning of data****************0001.00R SEQREC20002.00EMPNO5P 00003.00EMPNAME20A0004.00TEL10P 0****************** End of data ******************EMPNOEMPNAMETEL000001 10,001BOB825,777000002 10,001BOB825,999000003 10,001BOB825,888000004 10,002DANNY4,222,600****** ******** End of report********Columns . . . 1 71EditAMINEM/EXAMPLESEU==>JDFTSEQFMT LF*************** Beginning of data ******************0001.00R RECSEQJFILE (SEQ1 SEQ2)0002.00JJOIN (1 2)0003.00JFLD (EMPNAME1 EMPNAME)0004.00JDUPSEQ (TEL)0005.00EMPNOJREF (2)0006.00EMPNAME10007.00ADDRESS0008.00TEL****************** End of data************************EMPNOEMPNAME1ADDRESSTEL000001 10,001BOB23,OLD MADIWALA825,777000002 10,001BOB23,OLD MADIWALA825,888000003 10,001BOB23,OLD MADIWALA825,999000004 10,002DANNY50,LONGISLAND4,222,600****** ******** End of report********Join DESCENDColumns . . . 1 71EditAMINEM/EXAMPLESEU==>JDFTSEQFMT LF*************** Beginning of data ***********************0001.00R RECSEQJFILE (SEQ1 SEQ2)0002.00JJOIN (1 2)0003.00JFLD (EMPNAME1 EMPNAME)0004.00JDUPSEQ (TEL *DESCEND)0005.00EMPNOJREF (2)0006.00EMPNAME10007.00ADDRESS0008.00TEL****************** End of data *************************EMPNOEMPNAME1ADDRESSTEL000001 10,001BOB23,OLD MADIWALA825,999000002 10,001BOB23,OLD MADIWALA825,888000003 10,001BOB23,OLD MADIWALA825,777000004 10,002DANNY50,LONGISLAND4,222,600****** ******** End of report********JDFTVALWhen this file-level keyword is used the system provides default values for all for fields when a join to a secondary file does not produce any records.If this keyword is not specified a record in the primary file for which there is no corresponding record in the secondary file is skipped.JOIN OPEREATION FOR COMPOSITE KEY FIELDColumns . . . :171BrowseAMINEM/QDDSSRCSEU==>LOGICALFMT*************** Beginning of data *************************************0003.00A*0004.00ADYNSLT0005.00AJDFTVAL0006.00A0007.00AR LOG1JFILE(FILE1 FILE2)0008.00AJJOIN(FILE1 FILE2)0009.00AJFLD(LVLIDN1 LVLIDN2)0010.00AJFLD(ORGCOD1 ORGCOD2)0011.00AJFLD(ACNTNO1 ACNTNO2)0012.00AJFLD(RECSTS1 RECSTS2)0013.00ALVLIDNJREF(1)0014.00AORGCODJREF(1)0015.00AACNTNOJREF(1)0016.00ASUBCODJREF(1)0017.00AMKTCODJREF(1)0018.00ARECSTSJREF(1)0019.00AORGCODP0020.00APRTYNO0021.00AK LVLIDN10022.00AK ORGCOD10023.00AK ACNTNO10024.00AK SUBCOD1JOIN OPEREATION FOR MORE THAN 2 FILEColumns . . . :171EditAMINEM/PRJ1SEU==>LOGIC1FMT LF .....A..........T.Name++++++.Len++TDpB......Functions++++++++++++++++++*************** Beginning of data *************************************0001.000002.00AR LOG1JFILE( MASTER PARTYD TRANSA0003.00AJJOIN( MASTER PARTYD)0004.00AJFLD( PARTYPNUM)0005.00AJJOIN( MASTER TRANSACT)0006.00AJFLD( ACC ACCOUNT_NO)0007.00AORG0008.00AACC0009.00ACCY0010.00APNUM0011.00APNAME0012.00APADDR0013.00ATRAN_NO0014.00ATRAN_TYPE0015.00ATRAN_AMT0016.00ATRAN_YEAR0017.00ATRAN_MONTH0018.00ATRAN_DAY0019.00AK ORG0020.00AK ACC0021.00AK CCY****************** End of data ****************************************Inner join or natural joinInner join means the matching records in between the joining file will be selected.Columns . . . 1 71EditAMINEM/EXAMPLESEU==>JPF01FMT PF*************** Beginning of data ****************************0001.00R JP1REC0002.00EMPNO5S 00003.00EMPNAME20A0004.00K EMPNO****************** End of data *****************************EMPNOEMPNAME000001 1001SHRI000002 1002UPI000003 1003AMI****** ******** End of report********Columns . . . 1 71EditAMINEM/EXAMPLESEU==>JPF02FMT PF.*************** Beginning of data ***************************0001.00R JP2REC0002.00EMPNO5S 00003.00EMPSAL10P 20004.00K EMPNO****************** End of data ********************************Display ReportEMPNOEMPSAL000001 1001100.00000002 100220.00000003 1004300.00****** ******** End of report********Columns . . . 1 71EditAMINEM/EXAMPLESEU==>JOFILEFMT LF.*************** Beginning of data ************************0001.00R JREC1JFILE (JPF01 JPF02)0002.00JJOIN (1 2)0003.00JFLD (EMPNO EMPNO)0004.00EMPNOJREF (JPF01)0005.00EMPNAME0006.00EMPSAL0007.00K EMPNO****************** End of data*********************EMPNOEMPNAMEEMPSAL000001 1001SHRI100.00000002 1002UPI20.00****** ******** End of report********Left outer joinLeft outer join all the records from primary file and matching records from the secondary file will be selected.Columns . . . 1 71EditAMINEM/EXAMPLESEU==>JOOUTFMT LF.*************** Beginning of data*********************0001.00JDFTVAL0002.00R JREC1JFILE (JPF01 JPF02)0003.00JJOIN (1 2)0004.00JFLD (EMPNO EMPNO)0005.00EMPNOJREF (JPF01)0006.00EMPNAME0007.00EMPSAL0008.00K EMPNO****************** End of data********************EMPNOEMPNAMEEMPSAL000001 1001SHRI100.00000002 1002UPI20.00000003 1003AMI.00****** ******** End of report*******************Self-joinA physical file can be joined to itself to read records that are formed by combining two or more records from the PF itself.Columns . . . 1 71EditAMINEM/EXAMPLESEU==>SEJOINFMT PF*************** Beginning of data ********************0001.00R EMP0002.00EMPID5P 00003.00EMPNAME20A0004.00MGRID5P 00005.00K EMPID****************** End of data ***************************EMPIDEMPNAMEMGRID000001 10,001SEBI JOSEPH C.50,001000002 10,002PURUSHOTTAM50,002000003 10,003SAMEER DIGHE50,003000004 10,004SHARATA50,004000005 10,005PAUL50,005000006 50,001SHIVARAM90,001000007 50,002GAURAV90,002000008 50,003KING90,003000009 50,004SAM90,004000010 50,005ANIL90,005****** ******** End of report********Columns . . . 1 71EditAMINEM/EXAMPLESEU==> SELJOINFMT LF*************** Beginning of data **************************0001.00R EMPJFILE (SEJOIN SEJOIN)0002.00JJOIN (1 2)0003.00JFLD (MGRID EMPID)0004.00EMPIDJREF (1)0005.00EMPNAMEJREF (1)0006.00MANAGERRENAME (EMPNAME) JREF (2)0007.00COLHDG ('MANAGER')****************** End of data *****************************EMPIDEMPNAMEMANAGER000001 10,001SEBI JOSEPH C.SHIVARAM000002 10,002PURUSHOTTAMGAURAV000003 10,003SAMEER DIGHEKING000004 10,004SHARATASAM000005 10,005PAULANIL****** ******** End of report********Difference between non-join logical files and join logical filesNon join logical fileJoin logical file

We can able to insert or delete or update records using non-logical file.Insertion, updating or deletion of records is not possible in join logical files.

DFU can be used to display non-join logical file.DFU is not available

1-32 record format is specifiedOnly one record format can be specified

Commitment control is usedCommitment control cannot be used.

Related CommandI.Add Logical File Member (ADDLFM)II.Change Logical File (CHGLF)III.Create Duplicate Object (CRTDUPOBJ)IV.Display Database Relation (DSPDBR)Difference between physical file and logical filePhysical fileLogical file

1. Occupies the portion of memory. Its containing data.Does not occupy any memory space. Does not contain any data.

2. A physical file contains one record formatA logical file can contain up to 32 record formats.

3.Can be exist even without LFCant exist without PF

4. If you delete a LF, the PF cant be deletedIf you delete a LF, the PF cant be deleted

5.CRTPFcommand is used to create such objectCRTLFcommand is used to create such type object

Bottom of Form