Ü  Source physical file

·         Source physical file is a file which contains the sources of different types of objects.

·         Command used is CRTSRCPF.

 
CRTSRCPF FILE(IROBO1/QRPGSRC) RCDLEN(112) TEXT('SOURCE PHYSICAL FILE')

·         There can be up to 32767 members. 

·         Source physical file is an object. But the source member is not an object. When we compile the member, the object is created for that source.

 

To see all the source members of a source physical file, the command used is WRKMBRPDM.


                           Work with Members Using 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 of any type of object in a source physical file we use the command WRKMBRPDM and then F6.


 

Structure of the source physical file:


First 12 Columns Next 80 Columns Next 12 Columns
Serial no./Date Source of the member Comment

 

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

RUNQRY QRYFILE ((QRPGLESRC *LAST))

 

 

                                                 Display Report                                   
                                                                                                
 Position to line  . . . . .                                                                
 Line   ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+..
          SRCSEQ    SRCDAT   SRCDTA                                                                        
 000001     1.00   121,019        FPRINT1    o    E             PRINTER OFLIND(*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 default length of Source physical fileè92

Recommended length of Source physical fileè112

**Note: If we are copying the source code from one source file of length 112, we must assure that the target source file must be of length 112, else the source code will be truncated.

 

ü  Other than WRKMBRPDM, we can get the detail of Source physical file by command DSPFD.

 


 

Ü  Related commands

 

I.        Display File Description (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 above snapshot.

ü  File Level Identifier: It is actually the timestamp that relate to creation date/time of source file.

ü  Member Level Identifier: It is actually the timestamp that relate to creation date/time of Members.

                                              File/Member Level Identifiers are used by operations such as RSTOBJ to help avoid restoring files that are the wrong versions.

ü  Record Format Level Identifiers:  are hashes of attributes of all of the fields in the format. Attributes such as lengths and buffer positions are hashed in order to generate a nearly unique value.

                                                A difference between Format Level Identifiers in a program and in a file will result in a "level check" 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 will happen.(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, the maximum no. of record could be 10000+499*1000=509000 i.e. given as record capacity 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                                                                          
                               Source Creation    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                Display File Description                                   
  DSPFD Command Input                                                                  
    File  . . . . . . . . . . . . . . . . . . . : FILE       QRPGLESRC                 
      Library . . . . . . . . . . . . . . . . . :            IROBO1                    
    Type of information . . . . . . . . . . . . : TYPE       *MBRLIST                  
    File attributes . . . . . . . . . . . . . . : FILEATR    *ALL                      
    System  . . . . . . . . . . . . . . . . . . : SYSTEM     *LCL                      
  File Description Header                                                              
    File  . . . . . . . . . . . . . . . . . . . : FILE       QRPGLESRC                 
    Library . . . . . . . . . . . . . . . . . . :            IROBO1                    
    Type of file  . . . . . . . . . . . . . . . :            Physical                  
    File type . . . . . . . . . . . . . . . . . : FILETYPE   *SRC                      
    Auxiliary storage pool ID . . . . . . . . . :            00001                     
  Member List                                                                          
                               Source Creation    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                     











User Comments:



Subscribe

.  


Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy