Go4AS400-Image

The Web Ask Go4AS400
Share  
Homepage
See Sitemap
as400_FAQ
See Videos here
Contact me



Ü  Sourcephysical file

·        Source 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 is WRKMBRPDM.

                           Work with MembersUsing PDM                 PUB1    

                                                                               

 File  .. . . . .   QRPGLESRC                                                 

   Library . . . .     IROBO1               Position to  . . . . .             

                                                                               

 Type options, press Enter.                                                     

  2=Edit        3=Copy  4=Delete 5=Display       6=Print     7=Rename         

  8=Display description  9=Save 13=Change text  14=Compile  15=Create module...

                                                                               

 Opt Member      Type        Text                                             

      ACCOUNT     PF         ACCOUNT RELATED INFORMATION                      

      PRINT1      PRTF       PRINTER DDS RLU GENERATED                        

      PRINT1PGM   RPGLE      rpgle program for print1                         

                                                                               

                                                                                

                                                                        Bottom

 Parameters or command                                                         

 ===> _________________________________________________________________________

_______________________________________________________________________________

                                                                         

 F3=Exit          F4=Prompt             F5=Refresh            F6=Create        

 F9=Retrieve      F10=Command entry     F23=More options      F24=More keys    

                                                                               

To add source ofany type of object in a source physical file we use the command WRKMBRPDMand then F6.

 

Structure of the source physical file:

        12                                                80                                                           12

Serial no./Date
Source of the member
 

Comment

 

 

If you want tocheck the structure do the runqry to check it:

RUNQRY QRYFILE ((QRPGLESRC *LAST))

 

 

                                                         Display Report                                  

                                                                                               

 Position to line  . . . . .                                                               Shift to column

 Line  ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+...1

          SRCSEQ    SRCDAT  SRCDTA                                                                        

 000001    1.00   121,019        FPRINT1    o   E             PRINTEROFLIND(*IN90)                     

 000002    2.00   121,019        FACCOUNT   IF  E           K DISK                                      

 000003    3.00   121,019        C                   Z-ADD     *ZEROS        COUNT             2 0       

 000004    4.00   121,019        C                  WRITE     HEADER1                                   

 000005    5.00   121,019        C                   WRITE     HEADER2                                   

 000006    6.00   121,019        C                   READ      REC1                                   80 

 000007    7.00   121,019        C                   DOW       *IN80=*OFF                                

 000008    8.00   121,019        C                   WRITE     DETAIL                               90   

 000009    9.00   121,019        C  90              WRITE     HEADER2                                   

 000010   10.00   121,019        C                   EVAL      COUNT=COUNT+1                             

 000011   11.00   121,019        C                   READ     REC1                                  80 

 000012   12.00   121,019        C                   ENDDO                                               

 000013   13.00   121,019        C                   EVAL      TOTAL=COUNT                               

 000014   14.00   121,019        C                   WRITE     FOOTER                                    

 000015   15.00   121,019        C                  SETON                                        LR     

 ****** ********  End of report ********                                                                 

 

System defaultlength of Source physical fileè92

Recommendedlength of Source physical fileè112

**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 commands

 

I.       Display FileDescription (DSPFD)

 

DSPFD   IROBO1/QRPGLESRC

 

The command given information:

 

ü  It is a source physical file in library IROBO1.

ü  It’s 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 the  record 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=01

ü  Total record length : 112

ü  In the bottom summary of all members.

 

 

                                                       Display Spooled File

 File  .. . . . :   QPDSPFD                                                

 Control . . . . .                                                          

 Find  .. . . . .                                                          

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.

    12/31/12                Display File Description                        

  DSPFD Command Input                                                       

    File . . . . . . . . . . . . . . . . . . . : FILE       QRPGLESRC      

      Library . . . . . . . . . . . . . . . . .:            *LIBL          

  File Description Header                                                   

    File . . . . . . . . . . . . . . . . . . . : FILE       QRPGLESRC      

    Library . . . . . . . . . . . . . . . . . .:            IROBO1         

    Type of file  . . . . . . . . . . . . . . . :            Physical       

    File type . . . . . . . . . . . . . . . . .: FILETYPE   *SRC           

    Auxiliary storage pool ID . . . . . . . . .:            00001          

  Data Base File Attributes                                                 

    Externally described file . . . . . . . . .:            Yes            

    File level identifier . . . . . . . . . . .:            1121019191538  

    Creation date . . . . . . . . . . . . . . .:            10/19/12       

 

    Maximum members . . . . . . . . . . . . . .: MAXMBRS    *NOMAX        

    Number of constraints . . . . . . . . . . .:                0         

    Number of triggers  . . . . . . . . . . . . :                0         

    Number of members . . . . . . . . . . . . .:                3         

    Member size                                   SIZE                     

      Initial number of records . . . . . . . .:                 10000    

      Increment number of records . . . . . . .:             1000         

      Maximum number of increments  . . . . . . :              499         

    Record capacity . . . . . . . . . . . . . .:                509000    

    Coded character set identifier  . . . . . . : CCSID        273         

        Initial number of records . . . . . . .:                 10000     

        Increment number of records . . . . . .:             1000         

        Maximum number of increments  . . . . . :              499         

      Current number of increments  . . . . . . :                     0    

      Record capacity . . . . . . . . . . . . .:                509000    

      Current number of records . . . . . . . .:                     8    

      Number of deleted records . . . . . . . .:                     0    

      Starting journal receiver for apply . . .:                                    

 

    Member . . . . . . . . . . . . . . . . . . : MBR        PRINT1                  

      Member level identifier . . . . . . . . .:            1121019191550           

      Member creation date  . . . . . . . . . . :            10/19/12                

      Text 'description'  . . . . . . . . . . . : TEXT       PRINTER DDS RLU GENERATED

      Expiration date for member  . . . . . . . : EXPDATE    *NONE                   

      Member size                                 SIZE                               

        Initial number of records . . . . . . .:                 10000              

        Increment number of records . . . . . .:             1000                   

        Maximum number of increments  . . . . . :              499                 

      Current number of increments  . . . . . . :                     0    

      Record capacity . . . . . . . . . . . . .:                509000    

      Current number of records . . . . . . . .:                    66    

      Number of deleted records . . . . . . . .:                     0    

 

  Record Format List                                                                  

                         Record  Format Level                                         

   Format      Fields   Length  Identifier                                           

   QRPGLESRC         3     112  2A4BA13FFF687                                        

     Text . . . . . . . . . . . . . . . . . . .:                                     

   Total number of formats  . . . . . . . . . . :           1                         

   Total number of fields . . . . . . . . . . .:           3                          

   Total record length  . . . . . . . . . . . . :         112                         

  Member List                                                                         

                               SourceCreation    Last Change                  Deleted

   Member           Size        Type Date       Date     Time     Records    Records

   ACCOUNT                8192 PF     10/19/12 10/19/12 19:15:50          8          0

     Text: ACCOUNT RELATED INFORMATION                                                

   PRINT1                16384 PRTF   10/19/12 10/19/12 19:17:53         66          0

     Text: PRINTER DDS RLU GENERATED                                            

   PRINT1PGM              8192 RPGLE  10/19/12 10/19/12 19:15:50         15          0

     Text: rpgle program for print1                                                  

   Total number of members  . . . . . . . . . :                 3                     

   Total number of members not available  . . :                 0                     

   Total records  . . . . . . . . . . . . . . :                89                     

   Total deleted records  . . . . . . . . . . :                 0                     

   Total of member sizes  . . . . . . . . . . :             32768                     

                                                                                      

 

 

Note: The information can be filtered based on the TYPE attribute:            *MBR,*ACCPTH,*MBRLIST,*RCDFMT,*MBR.    

 

 

          

DSPFD FILE(IROBO1/QRPGLESRC) TYPE(*MBRLIST)

 

 

                                                       Display Spooled File          

 File  . . . . . :  QPDSPFD                                                          

 Control . .. . .                                                                     

 Find  . . . . . .                                                                    

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+.

   12/31/12                DisplayFile Description                                  

  DSPFDCommand Input                                                                 

   File  . . . . . . . . . . . . . .. . . . . : FILE       QRPGLESRC                

     Library . . . . . . . . . . . . . . . . . :            IROBO1                   

    Type ofinformation . . . . . . . . . . . . : TYPE      *MBRLIST                 

    Fileattributes . . . . . . . . . . . . . . : FILEATR    *ALL                     

   System  . . . . . . . . . . . . .. . . . . : SYSTEM     *LCL                     

  FileDescription Header                                                             

   File  . . . . . . . . . . . . . .. . . . . : FILE       QRPGLESRC                 

    Library. . . . . . . . . . . . . . . . . . :           IROBO1                   

    Type offile  . . . . . . . . . . . . . . .:            Physical                 

    Filetype . . . . . . . . . . . . . . . . . : FILETYPE   *SRC                     

   Auxiliary storage pool ID . . . . . . . . . :            00001                    

  MemberList                                                                         

                               SourceCreation    Last Change                  Deleted

  Member           Size        Type Date       Date     Time     Records    Records

  ACCOUNT                8192PF     10/19/12 10/19/12 19:15:50          8          0

    Text:  ACCOUNT RELATEDINFORMATION                                                

  PRINT1                16384PRTF   10/19/12 10/19/12 19:17:53         66          0

    Text:  PRINTER DDS RLUGENERATED                                                  

  PRINT1PGM              8192RPGLE  10/19/12 10/19/12 19:15:50         15          0 

    Text:  rpgle program forprint1                                                   

   Totalnumber of members  . . . . . . . . .:                 3                      

   Totalnumber of members not available  . .:                 0                      

   Totalrecords  . . . . . . . . . . . . . .:                89                      

   Totaldeleted records  . . . . . . . . . .:                 0                      

   Total ofmember sizes  . . . . . . . . . . :             32768                    

 

                                                                                       V



Comments:

Copyright © Go4as400.com, 2014. Copyright notice