Skip to main content  
        iSeries home   |   Easy400  
Public-Source
 
 
 
Introduction
About it
Prerequisites
Installation
 ODF commands
Examples
 
 Download
 
 

 
ODF commands

Summary

ODF is based on the following commands:

  1. ODSYS - defines the remote systems eligible for object distribution from the local system.
  2. ODSND - distributes (up to 300 remote systems) library objects, IFS objects and remote commands.
  3. ODSNDSTMF - distributes (up to 300 remote systems) stream files and a single remote command.
  4. ODRCV - receives from a remote system a single library objects or a single IFS object.
  5. RTVODSND - retrieves, prompts and re-runs a previous ODSND / ODSNDSTMF command
  6. RERUNODSND - re-runs a previous ODSND / ODSNDSTMF command.
  7. ODDSPLOG - displays the logs of the FTP batch jobs started from commands ODSND, ODSNDSTMF, ODRCV, RTVODSND, RERUNODSND
  8. CVTSTMF - converts a stream file to another CCSID.

1. ODSYS - Define Object Distribution Remote Systems

Use this command to define the remote systems eligible for object distribution from the local system.
For each remote system you must define:

  1. a unique 20-char identifier (if you wish, you may use its system name)
  2. its Internet address (IP address or DNS name)
  3. STRTCPFTP command optional parameters CCSID, PORT and SECCNN
  4. Remote OS/400 release. The following cases are available:
    1. The remote system is an IBM Sysytem i.
      In this case the you are required to specify (in the format VxRxMx (example: V6R1M0)):
      • Its currents OS/400 release
      • Its lowest previous OS/400 release (enter *NONE if no previous OS/400 release).
      When object transmission is done via save files, the transmission is successful only when the local system supports at leat one of the two OS/400 releases of the remore system.
      However, even when these conditions are not met, transmission of file members and IFS stream files is still possible.
    2. The remote system is not IBM Sysytem i. In this case the remote current OS/400 system release should be entered as *NOT-I and the previousOS/400 system release should be entered as *NONE .
      Only transmission of IFS stream files is possible.
  5. the name and the password of the user profile that will logon to this system via FTP.

Note- Data are collected on database file ODFDATA/SYSTEMS.
Security features:
  • Records are qualified by the current user profile. In other words, you can access only the records belonging to the current user profile you are running with.
  • Security sensitive data are crypted. Never try to maintain data on this file with any DFU-like utility: you would damage record data.

2. ODSND - Send objects to remote systems

Through this command you

  • define which of the remote systems participate to this object distribution
  • define the object(s) to be distributed
  • submit the batch job that performs the transmission and installation on the objects.
In a single command you may request:
  • up to 300 remote systems to receive this distribution
  • up to 10 initialization commands (commands to be run before objects are transmitted)
  • up to 10 library objects (or object collections, such as a library or a generic object name) to be transmitted and installed
    • for objects type *file, you may request to transmit a member list of up 50 member names
  • up to 10 IFS objects (or object collections, such as a complete directory, or a generic object name within a directory) to be transmitted an installed
  • up to 10 ending commands (commands to be run after all objects have been transmitted and installed)

Type odsnd and press F4. A prompt override program lets you select the remote systems (parameter SYSTEMS). You then receive the following command prompt:
                        Send objects to remote systems (ODSND)

 Type choices, press Enter.

 Target systems . . . . . . . . . SYSTEMS                            
                + for more values                                    
 Library objects:                 LIBOBJ        
   Object name  . . . . . . . . .                              Name, generic*, *ALL
   Object type  . . . . . . . . .                              *ALL, *ALRTBL, *AUTL...
   Source library . . . . . . . .                              Name
   Target library . . . . . . . .                *SAME         Name, *SAME
   Selected file members  . . . .                *NONE         Name, generic*, *NONE
                + for more values                          
                + for more values               
 IFS objects  . . . . . . . . . . IFSOBJ                                               
                
                + for more values                                                      
                 
 Promptable command . . . . . . . PMTCMD                                               
                                                                                       
                                                                                       
                                                                     
 Execute promptable command at  . PMTCMDEXEC     *NEVER        *START, *END, *NEVER
 Initial commands . . . . . . . . STRCMD                                               
                                                                                       
                                                                                       
                                                                     
                + for more values                                                      
                                                                                       
                                                                                       
                                                                     
 Ending commands  . . . . . . . . ENDCMD                                               
                                                                                       
                                                                                       
                                                                     
                + for more values                                                      
                                                                                       
                                                                                       
                                                                     
 Scheduled date . . . . . . . . . SCDDATE        *CURRENT      Date, *CURRENT
 Scheduled time . . . . . . . . . SCDTIME        *CURRENT      Time, *CURRENT
 Prompt restore commands  . . . . PMTRSTCMD      *NO           *YES, *NO
 LIBobj - Save active . . . . . . LIBSAVACT      *NO           *NO, *LIB, *SYNCLIB, *SYSDFN
 Save active wait time:           SAVACTWAIT
   Object locks . . . . . . . . .                120           0-99999, *NOMAX
   Pending record changes . . . .                *LOCKWAIT     0-99999, *LOCKWAIT...  
   Other pending changes  . . . .                *LOCKWAIT     0-99999, *LOCKWAIT, *NOMAX
 IFSobj - Save active . . . . . . IFSSAVACT      *NO          *NO, *YES, *SYNC
 IFSobj - Save active option  . . SAVACTOPT      *NONE        *NONE, *ALWCKPWRT
 Save active message queue  . . . SAVACTMSGQ     *NONE         Name, *NONE         
  Library   . . . . . . . . . . .                  *LIBL       Name, *LIBL, *CURLIB
 Private authorities  . . . . . . SAVPVTAUT      *NO           *YES, *NO
 Display FTP log  . . . . . . . . DSPLOG         *YES          *YES, *NO
Figure 1 - Command ODSND

Command parameters:

  • SYSTEMS - A list of the target systems that must install the distributed objects.
    • Use SYSTEMS(*SELECT) to select later on the remote systems from a list
    • Use SYSTEMS(*ALL) to address all the remote systems (defined via command ODSYS)
    • Use SYSTEMS(list_of_system_names) to address only given systems.
      Generic names are supported.
  • LIBOBJ - Up to 10 "library system" items.
    For each of them, enter:
    • an object name, a generic object name, or *ALL
    • an object type, or *ALL.
      • If the object type is *LIB, a SAVLIB command is run on the local system, a RSTLIB command is run on the remote system.
      • If the object type is *FILE, the way the object is trasmitted dependes on the "selected file members", see below.
      • For other object types, and for object type *ALL, a SAVOBJ command is run on the local system, a RSTOBJ command is run on the remote system.
    • Source library - The name of the object library on this system
      • If the object type is *LIB, library name QSYS is assumed.
    • Target library - The name of the destination library on the target system(s)
      • Type *SAME if the name of the destination library is the same as the source library one.
      • Type a different library name to have objects transferred to a different library on the target system(s).
      • If the object to be transferred is a library and you specify a different target library, on the target system(s) the library will be restored under that different library name.
    • Selected file members:
      • if the object type is not *FILE, *NONE must be specified.
      • if the object type is *FILE, the available choices are:
        • *NONE to request the whole object be distributed (a SAVOBJ command is run on the local system, a RSTOBJ command is run on the remote systems).
        • *SELECT to select from a list the file members to be transmitted via FTP PUT commands.
        • *ALL to request that each single member in the file is transmitted via an FTP PUT command.
        • up to 50 member names, to request that only the mentioned members are transmitted (via FTP PUT commands).
  • IFSOBJ - IFS objects to be distributed. Up to 10 IFS objects to be distributed.
    For each of them enter path and (generic) name of the IFS object(s) to be distributed. A maximum of 220 characters is allowed.
  • PMTCMD - Promptable command (Optional) - This is a promptable command (F4 supported) to be executed on the remote systems at the time specified by the next parameter PMTCMDEXEC.
    Note - This is the only promptable command that you can specify in this command (commands entered in parameters STRCMD and ENDCMD cannot be prompted). The ability to type a promptable command can be expecially useful when this is the only command to be executed on target systems.
  • PMTCMDEXEC - Timing for the execution of the promptable command:
    • *START - The promptable command is executed on the remote systems as soon as the FTP session is started, before any of the commands from parameter STRCMD is executed.
    • *END - The promptable command is executed on the remote systems just before the FTP session is ended, after that the last command from parameter ENDCMD has been executed.
    • *NEVER - The promptable command is NOT executed. You may use this value when parameter PMTCMD is used as a work area for copying and pasting commands into parameters STRCMD and ENDCMD.
  • STRCMD - Initial commands (Optional) - Up to 10 commands to be run on the remote systems, before that the objects are transmitted. A maximum of 220 characters is allowed for each command. Command prompt is not supported.
  • ENDCMD - Ending commands (Optional) - Up to 10 commands to be run on the remote systems, after that all the transmitted objects have been installed. A maximum of 220 characters is allowed for each command. Command prompt is not supported.
  • SCDDATE - The date when this distribution should occur.
  • SCDTIME - The time when this distribution should occur.
  • PMTRSTCMD - Prompt restore commands - If command ODSND is run in an interactive job, you may ask to prompt all the restore commands that will be run on the remote system(s) to perform the duties asked from this command.
    Note: Of course, if no restore commands need to be run of the remote system(s) - such as when just file members are sent - no list of restore commands is displayed.
    • Enter *YES if you want to prompt all the restore commands that will be run on the remote systems
    • Enter *NO not to prompt the restore commands that will be run on the remote systems.
  • LIBSAVACT, SAVACTWAIT - Library objects save-while-active parameters, as used in commands SAVLIB and SAVOBJ.
  • IFSSAVACT, SAVACTOPT - IFS objects save-while-active parameters, as used in commands SAV.
  • SAVACTMSGQ - Save-while-active parameter, as used in commands SAVLIB, SAVOBJ and SAV.
    NOTE- Within ODF, save-while-active is supported from OS/400 release 6.1 on.
  • SAVPVTAUT - Save private authorities - Specifies whether to save private authorities with the objects that are saved. Saving private authorities will increase the amount of time it takes to save the objects, but it can simplify the recovery of an object or a group of objects. It will not simplify the recovery of an entire system.
    • *NO - No private authorities are saved.
    • *YES - Private authorities are saved for each object that is saved.
      Note. You must have save system (*SAVSYS) or all object (*ALLOBJ) special authority to specify this value.
      At least release V6R1M0 is required.
  • ODDSPLOG - Display FTP log - Enter
    • *YES if you want to display the FTP log (command ODDSPLOG) as soon as the batch FTP job is submitted.
    • *NO if you do not want to display the FTP log now. You may enter command ODDSPLOG later.

3. ODSDNSTMF - Send stmf's to remote systems

While command ODF/ODSND may send stream files using a local save and a remote restore, this command sends stream files via FTP "as is".
The path of the target stream file is never a problem. Command ODF/ODSNDSTMF always tries to build the object path on the target system.
Once transmitted, remote commands care for converting each stream file to its original CCSID.

Type odsndstmf and press F4. You receive the following command prompt:
                    Send stmf's to remote systems (ODSNDSTMF)                   
                                                                                
 Type choices, press Enter.                                                     
                                                                                
 Remote systems . . . . . . . . . SYSTEMS                                       
                + for more values                                               
 Scheduled date . . . . . . . . . SCDDATE     *CURRENT      Date, *CURRENT                
 Scheduled time . . . . . . . . . SCDTIME     *CURRENT      Time, *CURRENT                
 Stream file  . . . . . . . . . . STMF                                                     
                              
                + for more values                                                          
                              
 Promptable command . . . . . . . PMTCMD                                                   
                                                                                           
                                                                                           
                              
 Execute promptable command at  . PMTCMDEXEC  *NEVER        *START, *END, *NEVER          
 Display FTP log  . . . . . . . . ODDSPLOG    *YES          *YES, *NO
Figure 2 - Command ODSNDSTMF

The meanings of command parameters are the same as in command ODSND.

4. ODRCV - Receive objects from a remote system

                        Receive from remote system (ODRCV)

 Type choices, press Enter.
                                                    
 Remote system  . . . . . . . . . SYSTEM      >                                             
 Scheduled date . . . . . . . . . SCDDATE       *CURRENT        Date, *CURRENT
 Scheduled time . . . . . . . . . SCDTIME       *CURRENT        Time, *CURRENT
 File system  . . . . . . . . . . FILESYSTEM  > 1               1=library system, 2=IFS system
 Library object:                  LIBOBJ
   Object name  . . . . . . . . .                               Name, generic*, *ALL
   Object type  . . . . . . . . .                               *ALL, *ALRTBL, *AUTL...
   Source library . . . . . . . .                               Name
   Target library . . . . . . . .               *SAME           Name, *SAME
   Selected file members  . . . .               *NONE           Name, *NONE
                + for more values                                                           
 LIBobj - Save active . . . . . . SAVACT        *NO             *NO, *LIB, *SYNCLIB, *SYSDFN
 Prompt restore commands  . . . . PMTRSTCMD     *NO             *YES, *NO
 File system  . . . . . . . . . . FILESYSTEM  > 2               1=library system, 2=IFS system
 IFS object . . . . . . . . . . . IFSOBJ                                                          
                                                                                 
 IFSobj - Save active . . . . . . IFSSAVACT     *NO             *YES, *NO
                         
 Display FTP log  . . . . . . . . ODDSPLOG      *YES            *YES, *NO
Figure 3 - Command ODRCV

  • If in parameter FILESYSTEM you specify 1 (library system), you receive the "yellow" parameters
  • If instead you specify 2 (IFS system), you receive the "green" ones.
For the meaning of these parameters, please refer to command ODSEND.

Note on parameter Objec type - If the library object to be received is a save file, instead of object type *FILE, you may specify *SAVF. By specifying object type *SAVF
  • a save file can be received also if the OS release of the receiving system is not supported by the remote system
  • the process is somehow quicker.


5. RTVODSND - Retrieve, prompt and execute a previous ODSND or ODSNDSTMF command

ODSND and ODSNDSTMF commands are assigned sequence numbers. Command RTVODSND allows to retrieve a previously run ODSND or ODSNDSTMF command, by specifying its sequence number. If the job executes in the interactive environment, the ODSND / ODSNDSTMF command is prompted for changes.

If a previously run ODSND command specified parameter PMTRSTCMD(*YES), the previously prompted restore commands must be re-entered. That can be done only in interactive mode.

                     Retrieve ODSND/ODSNDSTMF cmd (RTVODSND)

 Type choices, press Enter.

 ODSND/ODSNDSTMF cmd sequence no. . . SEQNBR         *LAST         Number, *LAST

Figure 4 - Command RTVODSND

  • ODSND sequence number (SEQNBR) - The sequence number of the ODSND or ODSNDSTMF command to be retrieved. You may specify the special value *LAST to retrieve the last ODSND or ODSNDSTMF command ever run.
Note - You may use command ODDSPLOG to select the previous ODSND / ODSNDSTMF command on which command RTVODSND should be run.

6. RERUNODSND - Re-run a previous ODSND or ODSNDSTMF command

ODSND and ODSNDSTMF commands are assigned sequence numbers. Command RERUNODSND allows to re-run a previously run ODSND or ODSNDSTMF command, by specifying its sequence number. No changes are allowed to the previous ODSND / ODSNDSTMF command.

If a previously run ODSND command specified parameter PMTRSTCMD(*YES), the previously prompted restore commands are taken into account.

                     Re-run ODSND/ODSNDSTMF cmd (RERUNODSND)
                                                                                
 Type choices, press Enter.

 ODSND/ODSNDSTMF cmd sequence no. . . SEQNBR         *LAST         Number, *LAST
 Display FTP log  . . . . . . . . . . DSPLOG         *YES          *YES, *NO

Figure 5 - Command RERUNODSND

  • ODSND/ODSNDSTMF sequence no (SEQNBR) - The sequence number of the ODSND / ODSNDSTMFcommand to be re-run. You may specify the special value *LAST to retrieve the last ODSND / ODSNDSTMFcommand ever run.
  • oddsplog - Select one of the following:
    • *YES to run command ODDSPLOG (Display FTP session logs), as soon as the batch job from command RERUNODSND has been submitted
    • *NO not to run command ODDSPLOG (Display FTP session logs) following the batch job submission.
    Note that parameter oddsplog has no effect if command RERUNODSND is executed in a batch job.
Note - You may use command ODDSPLOG to select the previous ODSND /ODSNDSTMF command on which command RERUNODSND should be executed.

7. ODDSPLOG - Display Object Distribution Logs

Use this command to display the FTP logs resulting from the jobs submitted from ODSND / ODSNDSTMF commands.

The command provides a list of all these jobs, starting from the most recent one.

  • Select the job you are interested in.
  • You are displayed a list of the target systems.
  • Select a target system.
  • You are displayed the FTP log resulting from the object distribution to that system.

Command ODDSPLOG provides options to run commands RTVODSND and RERUNODSND for a previously run ODSND / ODSNDSTMF command.

8. CVTSTMF - Convert a stream file

Use this command to convert a stream file to a different CCSID.

                      Convert a stream file (CVTSTMF)
 
 Type choices, press Enter.
                                                                
 Stream file  . . . . . . . . . . STMF                                         
                             
 To CCSID . . . . . . . . . . . . TOCCSID                   Number       
 Data format  . . . . . . . . . . DTAFMT      *BINARY       *BINARY, *TEXT
 Display stmf after conversion  . DSPSTMF     *NO           *YES, *NO

Figure 6 - Command CVTSTMF

  • stmf - The stream file to be converted.
  • toccsid - The CCSID this stream file will be converted to.
  • dtafmt - Select one of the following:
    • *BINARY - When there is a mismatch between the CCSID of the stream file (example: 819) and the CCSID its data are encoded with (example: 37), the stream file data show up as garbage when you try read them (example: with command DSPF) or to process them.
      What is needed in this case, is to change the CCSID of the stream file to match the CCSID its data are encoded with, leaving the stream file data as they are.
      This you can obtain by specifying the value *BINARY. Of course, the new stream file CCSID - specified in parameter TOCCSID - must match the data CCSID. However there is nothing telling you about the data CCSID, you must guess.
    • *TEXT - When the stream file CCSID and the data CCSID do match, the stream file data show up correctly when you read it (example: with command DSPF). In this case, if you want to change both the stream file CCSID and the data CCSID to a new value (example: from 819 to 37), you must specify *TEXT for this parameter.
  • dspstmf - Use this parameter to optionally display the stream file once the CCSID conversion is done, in order to check out the result from this process.