Pages

Wednesday, July 31, 2013

Useful tips for FTP

In my last post where I had discussed about image catalog using FTP of the ISO image. However, I did not discuss FTP in detail. Now, lets see some useful facts about FTP.

FTP can be done in two way GET and PUT :-

We can achieve the same result using both PUT and GET command. It is a two way process between the i-Series and the PC. Lets discuss with a example,

We want to transfer file abc.doc to iSeries system name Kelly. The file is at
C:\Documents and Settings\Sharmistha\My Documents

I want to transfer the document abc.doc to iSeries library QGPL

When I do it from my PC the command would be,

Go to command prompt

C:\Documents and Settings\Sharmistha\My Documents

Start FTP from this location to your iSeries system,

C:\Documents and Settings\Sharmistha\My Documents\ ftp kelly(ip address)

this will ask for login id and password. After you enter the system, do the following.

ftp> quote site namefmt 1 ( this is done for objects are defined in OS400  IFS format)

ftp> bin ( object transferred in binary form)

ftp> PUT abc.doc  /qsys.lib/qgpl.lib/abc.doc

This will transfer from PC to iSeries. Now, we can do the same using GET command,


:\Documents and Settings\Sharmistha\My Documents

Start FTP from this location to your iSeries system,

C:\Documents and Settings\Sharmistha\My Documents\ ftp kelly(ip address)

this will ask for login id and password. After you enter the system, do the following.

ftp> quote site namefmt 1 ( this is done for objects are defined in OS400  IFS format)

ftp> bin ( object transferred in binary form)

ftp> GET /qsys.lib/qgpl.lib/abc.doc abc.doc


Save files (SAVF) are great for transferring iSeries and AS/400 objects between OS/400-based machines. Whether it's a group PTF, a file, a library or even a licensed program, save files can quickly zip large amounts of information between two AS/400s, especially if the save files are transmitted via FTP.

Few things to keep in mind when using FTP:-

1- BINARY :- Binary transfers mean that OS/400 FTP will create an exact mirror image of your save file on your target machine. The file is transferred bit-by-bit, and it is reassembled on the receiving machine exactly as it looks on the sending machine, with no EBCDIC translation performed. Incidentally, this also helps speed up your FTP transfer.

2- NAMEFMT :- This is used to specify how the objects in OS400 are defined. NAMEFMT 1 is for IFS format and NAMEFMT 0 is for library/object format. When you use NAMEFMT 0 , the save file must be previously created in target AS400, to enable the transfer of  save file between systems. If this save file is not created, mostly the system would create a new physical file and store the save file in it which is not what you want. So, it is advisable to create save file in target system before FTP'ing.

When using NAMEFMT 1, in which Integrated file system nomenclature is used, the system automatically creates the save file, when you have used IFS naming convention and also you have mentioned .savf file extension.

Example,

PUT /qsys.lib/ssahoo.lib/abc.savf  /qsys.lib/target.lib/abc.savf

3- Empty target save file for correct FTP :-  If you have created the target save file newly or if it is empty then the FTP completes successfully. You can use CRTSAVF command to create save file in target system or use CLRSAVF command to clear the existing save file in target system.

4- Using RCMD from command prompt :- You can also use RCMD command from PC command prompt to execute AS400 command in the iseries system.

Example,

QUOTE RCMD CRTSAVF FILE(SSAHOO/ABC) TEXT('SAVE FILE FOR TARGET MACHINE)







Friday, July 26, 2013

Finding information of last Full system save

For Auditing and for disaster recovery it is useful, to have information of the last Full system save. Usually, across the industry, it is a best practice to store the Backup information. Generally, the tape used for the backup and the backup type and whether it was a successful backup or not is recommended to be kept stored. Some, firms have soft copies of these information and some hard copy of the  information stored.

By keeping these information, it makes things easier at the time of disaster. Lets now look at the native SAVE operations that is available with OS400. IBM provides many useful data area that save the important information of the last Full system save.

* QSAVSYS :- This data area saves information of the last SAVSYS command run.

* QSAVCFG :- This data area saves information of the last save on Configuration objects and the system resource objects.

*QSAVUSRPRF :- This data area saves information of the last save of all user profile in the system

*QSAVIBM :- This data area saves information of the last save on  IBM libraries or system libraries that starts with Q.

*QSAVALLUSR :- The data area saves information of all the last SAVLIB with *ALLUSR was run. It saves information of User libraries and also the Q libraries that are not considered system libraries such as QGPL, QPFR etc.

*QSAVLIBALL :- This data area saves information of the last SAVLIB with *NONSYS was run, which saves all the user libraries, QGPL and QUSRSYS.

*QSAVSTG :- This data area saves information of the last SAVSTG was run, this stores information of License internal code and content of auxiliary storage.

However, if you try to read the information on these data areas by the normal DSPDTAARA it would appear blank.

You can get the list of QSAV data areas by the following command,

WRKOBJ OBJ(QSYS/QSAV*) OBJTYPE(*DTAARA)


To get information about the last save system,

DSPOBJD OBJ(QSYS/QSAVSYS) OBJTYPE(*DTAARA) DETAIL(*FULL)
 Page down to the bottom,


Here, you can get the date and time when the last full system save was taken. The Tape used and the command that was run. 

Thursday, July 18, 2013

Option 21 Full system Save

The OS400 provides SAVE menu to take backup. As we have already seen in previous post, this menu helps in taking specific backups like libraries or objects. To take a Full system Save using this IBM native menu, the option is OPTION 21, for Full System Save. Therefore, it is often known as OPTION 21 Backup.

Now, lets explore this in detail,

From command line enter command GO SAVE.


Page Down to option 21 Entire System.

Take Option 21, now the below screen appears.

Enter to continue.
Specify the device name and other options as per the requirement. Page down .










Wednesday, July 17, 2013

Introduction to Backup

Overview

As with all computer systems, your work on the i5 should be backed up periodically so that you can recover lost data.

Losing data is disastrous if you don't have a backup of everything you could possibly lose.

Initializing

You need to prepare the tape or diskette before you back up anything to tape or diskette. This process is called initialization.

Initializing Tapes
INZTAP

F4


Backing Up
Backing up is a very important part of daily operations. The i5/OS has a different save command for each type of saving operation. 

Always remember to:

You have enough initialized tapes.
Give *SAVSYS special authority to those users who need to perform any kind of save or restore operation.

Saving Libraries 
SAVLIB LIB(XYZ) DEV(TAP01) 

Saving Objects
SAVOBJ OBJ(ABC) LIB(XYZ) DEV(TAP01) OBJTYPE(*FILE) OUTPUT(*PRINT)


Below, screen describes the various commands under GO SAVE menu, these can be individually used to save specific objects in OS400.


Using Save Files
To use a save file instead of tape, you must create the save file first.

CRTSAVF FILE(MYLIB/MYSAVF) TEXT('Save file for backups') 

To save to the save file, execute the usual save command, except specify DEV(*SAVF) and the name of the save file in the SAVF parameter.

SAVLIB LIB(ACCTG) DEV(*SAVF) SAVF(MYLIB/MYSAVF) 

This command saves the entire ACCTG library in save file MYSAVF in library MYLIB.

Entire System Backup

Step 1 : Hold All Job Schedule Programs

Step 2 : ENDSBS *ALL ( *IMMED)

Step 3 : WRKSBS ( Display Active Subsystem ) 
Check if all subsystem have ended .

Step 4 : WRKACTJOB ( Display Active Job )
Check if any job is active .
Step 5 : GO SAVE ( F4 ) ( For Backup )


Take Option 21 for Full system save.


Checking Cache Battery information using SST

Hi,

Just wanted to expand the same topic about finding the Cache battery using the Service tools application. For this you need to use an id that has authority to run service tool and also you need have the service tools id and password. In general, these passwords are protected and is provided on valid request. This passwords are kept in a database that cannot be accessed by the Admin team. It is provided to admin team on demand and is kept protected. This enables Industry to keep check on how these are used and when, so that there is no misuse.

To start the Service tools application use command :- STRSST

It will ask to provide the SST user id and password, once you are inside this the screen looks as below,


Take option 1 to start, after this the following screen appears and take option 4 there.

Then take option 1

Take Option 2 in below screen,

In the LIC screen take page down,

Check for advance analysis, take option 14,


Check for Battery info and select that in Advance analysis screen,

Now, this will provide you full information of all the cache battery.



Page down to check more information.



Here, you can clearly identify in above example the DC01 battery needs to be replaced immediately as the Est. time to warning and Est. time to error are zero.



Monday, July 15, 2013

Implementing BACKUP in AS400 using native AS400 OS backup system

Now a days, BRMS (Backup Recovery Media Services) is more widely used and recommended software that is being used for backup management. However, I am going to first describe the Native Backup management system that AS400 OS provides and how this can be configured and managed to take up backup successfully for Daily, Weekly, Monthly etc. Lets now describe the feature and how to setup backup using this,

The AS/400 backup program is native to the AS/400 operating system.  It can be accessed from a command line by typing go backup.  Follow the procedures below to implement a backup job.

Daily Backup

·         Option 10 to Set a backup
·         Option 1 to Change daily backup options
·         TAP01 for Backup device
·         *ANY for Tape sets to rotate
·         Y to Erase tape before backup
·         1 (selected from list) for User libraries
·         3 (none) for Folders
·         3 (none) for User directories
·         N for Security data
·         N for Configuration
·         N for Save changed objects only
·         Y for Submit backup as batch job
·         Y for Print detailed report

Press enter will schedule the job on the job scheduler. 

Weekly Backup

·         Option 10 to Set a backup
·         Option 2 to Change weekly backup options
·         TAP01 for Backup device
·         *ANY for Tape sets to rotate
·         Y to Erase tape before backup
·         1 (selected from list) for User libraries
·         3 (none) for Folders
·         3 (none) for User directories
·         Y for Security data
·         Y for Configuration
·         N for Save changed objects only
·         Y for Submit backup as batch job
·         Y for Print detailed report

Press enter will schedule the job on the job scheduler. 

Monthly Backup

These options are not used.

Quarterly Backup

·         Enter go save from a command line
·         Option 21 for Entire system
·         Use defaults except for N for Active files and *NOTIFY for Message queue delivery
·         Use defaults to end subsystems
·         Use defaults for save system, save library, save document library, and save object

Backup Libraries

·         Option 10 to Set a backup
·         Option 10 to Change library backup list
·         Option 2 to select libraries to back up and then select option 1 (daily, weekly, monthly), option 2 (weekly and monthly), option 3 (weekly and monthly), or option 4 (no backup)

Backup Folders

Folders are not backed up on the AS/400 except for quarterly backups.

Backup Schedule

·         Option 20 to Change backup schedule
·         Y to Run backups using this schedule
·         Enter type of backup and time with appropriate day
·         Leave blank Occurrence of day in month to run monthly backup
·         *NOMSG for Hours before backup to send load tape message

Press enter to schedule the backup jobs according to this schedule.

Backup Job Names

From a command line, enter wrkjobscde to access the job scheduler. You can use this to schedule the backups, the job names for the same are as below.
·         QEZBKTMMON
·         QEZBKTMTUE
·         QEZBKTMWED
·         QEZBKTMTHU
·         QEZBKTMFRI
·         QEZBKTMSAT

·         QEZBKTMSUN

Cache Battery Information

The Cache battery plays a significant role to provide power to the hard disk. When one of these batteries dies, it affects the array of disk that it controls and will have a significant impact on the hard disk performance. The Cache battery or lithium ion batteries can be hot swapped, means  they can be changed when the system is up and running. However, sometimes depending on the machine type it would require to bring down the system to change the battery.

The battery sends warning messages to QSYSOPR message queue before 90 days of its expiry.

CPPEA13 - *Attention* Contact your hardware service provider
CPP8988 - A critical system hardware problem has occurred. Critical Message Handler has been run.

Once, you confirm that this is a battery that is about to expire from work with problem (WRKPRB) or via STRSST or by QSMBTTCC program.

Through QSMBTTCC program:-

CALL PGM(QSYS/QSMBTTCC)  


As you can see here the Estimated time to warning and Estimated time to error , you can determine how many days are left to change the battery. Then you have to call up IBM and inform them your battery resource name , serial number that needs to change. IBM will deliver the new battery and will the CE(customer engineer) will replace this. In order to avoid any critical situation , it is wise to record the battery information once a week or month for all the system that you manage. 

You can also pull the same information by using STRSST profile.
STRSST :- 

After you sign in to SST, you can check the status of all cache batteries on your machine by selecting option 1 (Start a Service Tool) followed by option 7 (Hardware Service Manager), and option 9 (Work with resources containing cache battery packs). The Work with resources containing battery packs screen displays all the resources that contain a battery pack. If you take an option 5 (Display battery information) for any of the battery packs, you will see a screen that looks something like this. 

Battery Information         
                                                         
Resource name . . . . . . . . . . . :  DC01              
Serial number . . . . . . . . . . . :  xx-xxxxxxx        
Type-model  . . . . . . . . . . . . :  2757-001          
Frame ID  . . . . . . . . . . . . . :  1              
Card position . . . . . . . . . . . :  C01               
Battery type  . . . . . . . . . . . :  Lithium Ion (LiIon)
Battery state . . . . . . . . . . . :  Warning condition 
Power-on time (days)  . . . . . . . :    806             
Adjusted power-on time (days) . . . :    945             
Estimated time to warning (days)  . :      182            
Estimated time to error (days)  . . :     273

Note :- Both the message warning value and the time to error value are marked as estimates. This means that these numbers are not exact predictive values; battery failure could be much closer than you think and you should get IBM in as soon as possible to help survey the situation and schedule a cache battery pack change.      



Related Posts Plugin for WordPress, Blogger...