Kamis, 03 Desember 2015

Do'a yang diajarkan Jibril kepada Nabi Muhammad untuk membakar jin jahil



Katakanlah Muhammad
Bagi segenap orang-orang yang beriman Al-Qur’an menjadi petunjuk dan juga obat.
(QS. Fushshilat : 44)
Do'a tersebut dibawah inilah yang diajarkan oleh Malaikat Jibril kepada Baginda Rasulullah SAW ketika diganggu Ifrit dari bangsa Jin disaat dalam perjalanan Isra' Mi'raj.

Dalam kisah Isra’ Mi’raj... ketika Rasulullah SAW terbang dengan mengendarai Buraq yang diampingi oleh malaikat Jibril... tiba-tiba beliau melihat Ifrit dari bangsa Jin yang mengejar beliau dengan semburan (energi) api.
Setiap Nabi menoleh beliau melihat Ifrit itu terbang membuntuti untuk mencelakakan Nabi dengan terus-menerus menyemburkan (energi) Api dari peralatan obor yang dibawah Jin Ifrit itu.
Kemudian Jibril berkata :
"Tidakkah aku ajarkan kepada anda (Nabi SAW) beberapa kalimat... jika anda baca maka akan memadamkan apinya dan terbalik kepada wajahnya lalu dia binasa (hancur lebur)?"

Kemudian Jibril AS memberitahukan doa tersebut kepada Rasulullah SAW :

 Doa Ruqyah dari malaikat Jibril

"Aku berlindung dengan wajah Allah yang Maha Mulia dan dengan Kalimat-Kalimat Allah yang Sempurna yang tidak ada “melampauinya” segala kebaikan maupun keburukan dari kejahatan apa yang masuk ke dalam bumi dan apa yang keluar darinya dan dari kejahatan apa yang turun dari langit dan apa yang naik kepadanya. Dan dari kejahatan fitnah di malam dan siang hari dan dari kejahatan jalan-jalan di malam dan siang hari, kecuali suatu jalan yang dilalui dengan kebaikan, wahai yang Maha Penyayang".
Setelah Nabi Muhammad saw. membaca doa tersebut, maka jin Ifrit yang membuntuti beliau jatuh tersungkur lalu binasa dan obornya padam.
(HR. Bukhari)

Do’a yang seperti di atas berdasarkan Kitab Muwatta Malik:



رقم الحديث: 1709
(حديث مرفوع) وَحَدَّثَنِي ، عَنْ مَالِك ، عَنْ يَحْيَى بْنِ سَعِيدٍ ، أَنَّهُ قَالَ : أُسْرِيَ بِرَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَرَأَى عِفْرِيتًا مِنَ الْجِنِّ يَطْلُبُهُ بِشُعْلَةٍ مِنْ نَارٍ ، كُلَّمَا الْتَفَتَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ رَآهُ ، فَقَالَ لَهُ جِبْرِيلُ : أَفَلَا " أُعَلِّمُكَ كَلِمَاتٍ تَقُولُهُنَّ إِذَا قُلْتَهُنَّ طَفِئَتْ شُعْلَتُهُ وَخَرَّ لِفِيهِ ؟ فَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " بَلَى " ، فَقَالَ جِبْرِيلُ : فَقُلْ أَعُوذُ بِوَجْهِ اللَّهِ الْكَرِيمِ ، وَبِكَلِمَاتِ اللَّهِ التَّامَّاتِ اللَّاتِي لَا يُجَاوِزُهُنَّ بَرٌّ وَلَا فَاجِرٌ ، مِنْ شَرِّ مَا يَنْزِلُ مِنَ السَّمَاءِ وَشَرِّ مَا يَعْرُجُ فِيهَا ، وَشَرِّ مَا ذَرَأَ فِي الْأَرْضِ وَشَرِّ مَا يَخْرُجُ مِنْهَا ، وَمِنْ فِتَنِ اللَّيْلِ وَالنَّهَارِ وَمِنْ طَوَارِقِ اللَّيْلِ وَالنَّهَارِ ، إِلَّا طَارِقًا يَطْرُقُ بِخَيْرٍ يَا رَحْمَنُ "





Rabu, 02 Desember 2015

AS400 Showcase Article - Writing CL Programs

In this rapidly changing world of the AS/400, the only constant is change. In fact, it's not the AS/400 anymore. So with topics like iSeries, Domino, Version 5, Websphere and Java dominating the press, it is easy to loose track of the basic skills needed to survive and flourish in the iSeries world. Here I present a small example of the power of Command Language (CL) programming. This example is small enough to easily follow and yet it uses some of the less obvious features of CL. Beginning programmers as well as system administrators can write these simple programs and learn why experienced programs love the command language of OS/400. Parkinson's Law of Data is that data expands to fill the space available for storage. My corollary to this law is that no matter how much disk storage you have, you only have 20% left. Here is a simple and powerful tool to help discover where your disk space is going.
This tool consists of two small Command Language (CL) programs. These programs use two features of CL that are somewhat hidden. These are:

· Using the *OUTFILE option to create a file
· Using RCVF to read a database file
This process builds a single database file that summarizes every file on your system. You can use this file as input to a query to list:
· Files by size
· Files by last date changed
· Files by owner
The first CL program will generate a list of all user libraries. The second program will read this list and use it to build a composite list of all files on the system.
OS/400 keeps a description of every library and file. You probably know that these descriptions are viewable using the Display Object Description (DSPOBJD) command. By changing the OUTPUT option to *PRINT, you can print the descriptions. But what is less obvious is that by changing the OUTPUT option to *OUTFILE, the command will create a database file as output.
Figure 1 shows the Command Language program to create a file listing all libraries on the system. The operating system keeps a description of each library in the General Purpose Library (QGPL). By using the DSPOBJD command with the *OUTFILE option, OS/400 will build a database file that has a record for each library. The database file is named in the OUTFILE parameter of the DSPOBJD command.
Entering the DSPOBJD command in Figure 1 is a little tricky. Key in the command DSPOBJD and hit F4. Then fill in the values for the object and object type. For the OUTPUT parameter, use *OUTFILE. When you hit enter, OS/400 will see that you are creating an *OUTFILE and will display more keywords. Then you can fill in the OUTFILE keyword.
The program in Figure 1 does a little housekeeping first to delete the list of libraries from the last time this program was run. The MONMSG command tells the program to continue if the file does not already exist. Finally, the DSPOBJD command finds the descriptions of all user libraries on the system and creates a file named ALLLIBS to hold the descriptions.
After running this program, you can examine the records in ALLLIBS. OS/400 has a database format already defined to hold this information. In the file are fields to hold the specific information about the library. Included in these fields are:
ODOBNM - the object name which in this case is the library name
ODOBSZ - the object size which in this case is the size of the library description
ODLDAT - the date the object was last changed
Now, all that is needed is a program to read each record in ALLLIBS, find the description of all files in each library and put the descriptions in a single output file. Figure 2 has the CL program to read the data in ALLLIBS and use it to build the file ALLFILES.
In Figure 2, the second line is the Declare File (DCLF) command. This is like a File Specification in RPG. It tells the compiler to look for this file and to use the field names in the file as part of the compiled object. In other words, the CL can reference any field in the file.
The next two lines of the program take care of housekeeping to delete the ALLFILES file. The next executable statement is the Receive File (RCVF) command. This is the instruction to read a record from the file. Since CL allows only one Declare File (DCLF) statement per program, the RCVF command does not need to specify a file name. It reads the only one mentioned in the DCLF command.
When the end of file is reached, the message CPF0864 will be sent. The Monitor Message instruction, MONMSG MSGID(CPF0864) will realize that the end of file has been reached and will go to the label EOJ.
Otherwise, the program will continue with the next statement which is a Display Object Description (DSPOBJD) command. We used this command in the other program to get the descriptions of all libraries. Here, we use it to get a list of all files in the first library. The name of the library is in the field named ODOBNM. So, by using the field name &ODOBNM as the value of the library and using *ALL as the value for the file, the command will get the object descriptions of all files in the first library. By using the *OUTFILE option, we tell OS/400 to write the file descriptions to a file named ALLFILES.
The program then goes back to the statement labeled LOOP. It reads another record from the ALLLIBS file. It gets a list of descriptions of all files from that library and adds them to ALLFILES. It continues until it has added all descriptions of all files.
When the program is done, you have the file, ALLFILES which has the size, description, owner and last date changed of every file on your system. To help manage your disk space you can write queries to find files that should be deleted. You can look for files owned by programmers that no longer work at your company. You can sort the files by last changed date to find files that are no longer in use. You may want to make it a month end procedure to re-create ALLFILES and then print out a summary of file space being used by different systems. In short, you have a tool to help manage disk space.


Figure 1 - This CL program generates a list of all user libraries.
 
            PGM                                                      
                                                                     
            DLTF            FILE(YOURLIB/ALLFILES)                        
            MONMSG     MSGID(CPF2105)                                
            DSPOBJD    OBJ(*ALLUSR) OBJTYPE(*LIB) OUTPUT(*OUTFILE) + 
                               OUTFILE(YOURLIB/ALLLIBS)                    
                                                                     
                                                                     
            ENDPGM                                                   
 

Figure 2 - This CL program reads the data in ALLLIBS and uses it to build ALLFILES.

             PGM                                                     
             DCLF       FILE(YOURLIB/ALLLIBS)                        
             DLTF       FILE(YOURLIB/ALLFILES)                       
             /* IF FILE DOES NOT EXIST, THAT'S OK      */            
             MONMSG     MSGID(CPF2105)                               
LOOP:        /* READ A RECORD FROM "ALLLIBS"           */            
             RCVF                                                    
             /* IF END OF FILE IS REACHED, GO TO END   */            
             MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(EOJ))        
             DSPOBJD    OBJ(&ODOBNM/*ALL) OBJTYPE(*FILE) +           
                        OUTPUT(*OUTFILE) +                         
                        OUTFILE(YOURLIB/ALLFILES) OUTMBR(*FIRST +  
                        *ADD)                                      
             /* IF LIBRARY HAS NO FILES, THAT'S OK     */            
             MONMSG     MSGID(CPF2123)                               
             GOTO LOOP                                               
EOJ:


AS400 RPG III Programming - Adding a Loop, IF and Subroutine


In a previous topic, you should have written a very short RPG III program to change the first record in the CUST file.
Let's add so more statements to the program so that it will read all records in the file and change the zip code for everyone in Tennessee.
You may want to read this very short article on data navigation first:
Data Navigation
Your program will still reference the CUST file, so, use DSPLIBL to display your library list. If you don't see your user library in the list, use the CHGCURLIB USER999 command. This will change your current library to USER999. Remember that when I say USER999, I mean your user ID.
You can look at your data file with the command: RUNQRY QRYFILE(CUST)
Now, use PDM to copy your old program. Start PDM (STRPDM). You should see something like:
 
--------------------------------------------------------------------- 
                 AS/400 Programming Development Manager (PDM)  
                                                               
Select one of the following:                                   
                                                               
     1. Work with libraries                                    
     2. Work with objects                                      
     3. Work with members                                      
     4. Work with projects                                     
     5. Work with groups                                       
     6. Work with parts                                        
                                                               
     9. Work with user-defined options                         
--------------------------------------------------------------------- 
Key in 3 and hit ENTER. Fill in the screen to look like:

                      Specify Members to Work With                        
                                                                          
Type choices, press Enter.                                                
                                                                          
  File  . . . . . . . . . .   QRPGSRC      Name, F4 for list              
                                                                          
    Library . . . . . . . .     user999    *LIBL, *CURLIB, name         
                                                                          
  Member:                                                                 
    Name  . . . . . . . . .   *ALL         *ALL, name, *generic*          
    Type  . . . . . . . . .   *ALL         *ALL, type, *generic*,  
                                                                          
----------------------------------------------------------------------- 
Of course, change the USER999 to your user ID. Hit ENTER now. Your screen should look like:

                                                                              
File  . . . . . .   QRPGSRC                                                   
  Library . . . .     USER999              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                                             
        TUTR001     RPG         Change the first record in CUST file                                                
Key a 3 as the option next to TUTR001. Hit ENTER and then fill in the screen to copy the program and name it TUTR004:

                                 Copy Members                     
                                                                  
 From file . . . . . . . :   QRPGSRC                              
   From library  . . . . :     USER999                            
                                                                  
 Type the file name and library name to receive the copied members
                                                                  
   To file . . . . . . . .   QRPGSRC      Name, F4 for list       
     To library  . . . . .     USER999                            
                                                                  
 To rename copied member, type New Name, press Enter.             
                                                                  
 Member         New Name                                          
 TUTR001        TUTR004                                           
Hit ETER and you should now see the copied program in your list. You may want to change the description of the program so you'll remember which program does what. Your screen should look like: Remember from your PDM lesson that this is trying to show you a list of all of the RPG
Work with Members Using PDM
                                                                    
 File  . . . . . .   QRPGSRC                                        
   Library . . . .     USER000              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
                                                                    
 Opt  Member      Type        Text                                  
      TUTR001     RPG         Change the first record in CUST file  
      TUTR004     RPG         Change all TN records in CUST file    
Key a 2 next to TUTR004 so you can change the source statements to the program. Before we make the changes to the program we need to discuss different ways to write a loop. We want a loop that will read every record in the CUST file and change the records that have TN (Tennessee) as the state.
I always think of a loop as saying:

 Try to Read a record from the file
 If there was a record then
  change it
  update it
 Go back and try to read the next record
Remember that when RPG III reads a record, you must specify which indicator to turn on it there are no more records; that is, it is END OF FILE. You could write the instructions above in RPG III like this:

FCUST    UF  E                    DISK                 
C           READIT    TAG                              
C                     READ CUST                     90 
C           *IN90     IFEQ *OFF                        
C                     MOVE *BLANK    CSADR1            
C                     MOVEL'456 OAK' CSADR1            
C                     UPDATCSREC                       
C                     GOTO READIT                      
C                     ENDIF                            
C                     MOVE *ON       *INLR             
C                     RETRN                            
This program says to define a file named CUST. Then, name the first line of the Calculations READIT. The, try to read a record (if END OF FILE, move ON to indicator# 90) If indicator# 90 is *OFF Move … Move … Update … Go back to the first line of the program Turn on the "magic" LR indicator End the program
This will work. The only problem is that for about 15 years, it has been considered bad style to use GOTO statements. This is an industry trend that includes all languages and all computers.
The reason is that long programs are hard to understand when there are a lot of GOTO statements. Programs with lots of GOTO's are nicknamed spaghetti programs because the statements can be as hard to follow as a strand of spaghetti.
SO, the industry prefers that we use DO statements. We can use a DO WHILE or a DO UNTIL. This still leaves us with 2 good ways to write the loop. I prefer the first because it looks a lot like the GOTO loop but without the GOTO:

FCUST    UF  E                    DISK                
C           *IN90     DOWEQ*OFF                       
C                     READ CUST                     90
C           *IN90     IFEQ *OFF                       
C                     MOVE *BLANK    CSADR1           
C                     MOVEL'456 OAK' CSADR1           
C                     UPDATCSREC                      
C                     ENDIF                           
C                     ENDDO                           
C                     MOVE *ON       *INLR            
C                     RETRN                           
This program defines the file and then starts a DO loop. The DOWEQ statement says that as long as indicator # 90 is OFF, execute all of the statements until the ENDDO (End DO) statement.
Then, start back at the top (a lot like a GOTO). If indicator # 90 is still OFF, execute the statements again. Eventually, the program will read all 1,000+ records in the file. When it does, indicator # 90 will be turned ON.
When indicator # 90 is ON, the program will not update the record and it will not continue to loop.
The other way to code the loop is with what is called a priming read statement. This method needs 2 READ statements but does not need the IF statement.
If looks like:

FCUST    UF  E                    DISK                    
C                     READ CUST                     90    
C           *IN90     DOWEQ*OFF                           
C                     MOVE *BLANK    CSADR1               
C                     MOVEL'456 OAK' CSADR1               
C                     UPDATCSREC                          
C                     READ CUST                     90    
C                     ENDDO                               
C                     MOVE *ON       *INLR                
C                     RETRN                               
Here, the first record is read before the DO begins. The statements are executed and the READ statement is at the end of the DO loop. Either of these 2 methods is considered good code. I prefer the first.
Using the first acceptable loop, add the IF statement to test to see if the state is TN. Also, replace the code so that it changes the ZIP to 987650000.
First, do this by putting in an IF statement like this:

C           CSSTE     IFEQ 'TN'                      
C                     MOVE 987650000 CSZIP           
C                     UPDATCSREC                     
C                     ENDIF                          

So, the whole program looks like:

FCUST    UF  E                    DISK                
C           *IN90     DOWEQ*OFF                       
C                     READ CUST                     90
C           *IN90     IFEQ *OFF                       
C           CSSTE     IFEQ 'TN'                       
C                     MOVE 987650000 CSZIP            
C                     UPDATCSREC                      
C                     ENDIF                           
C                     ENDIF                           
C                     ENDDO                           
C                     MOVE *ON       *INLR            
C                     RETRN 
This is considered good code by most programmers. But it really helps to move the update logic to a separate place in the program as a subroutine. This is done here only to help readability. It doesn't change the outcome. In RPG, subroutines begin with a BEGSR (BEGIN SUBROUTINE) statement which also has the name of the subroutine. They end with ENDSR (END SUBROUTINE). They are run with the EXSR (EXECUTE SUBROUTINE) command.
If we move the update logic to a subroutine named UPD, the program looks cleaner. Also, we can add "COMMENTS" records. Any statement with a * after the record type, is a "COMMENT". In fact you can even remove the record type (the C or F in column 6).
With a few comment lines added to define the sections of the program, we get a pretty readable program:

FCUST    UF  E                    DISK                 
 *-----------------------------------------------------
C           *IN90     DOWEQ*OFF                        
C*
C                     READ CUST                     90 
C           *IN90     IFEQ *OFF                        
C                     EXSR UPD                         
C                     ENDIF                            
C                     ENDDO                            
C*                                                     
C                     MOVE *ON       *INLR             
C                     RETRN                            
 *-----------------------------------------------------
C           UPD       BEGSR                            
C*                                                     
C           CSSTE     IFEQ 'TN'                        
C                     MOVE 987650000 CSZIP             
C                     UPDATCSREC  
C                     ENDIF       
C*                                
C                     ENDSR        
 *------------------------------------------------------
Now, compile this (remember… option 14) and run it (CALL TUTR004). Then use RUNQRY QRYFILE(CUST) to see the data. If you scroll right by hitting F20 (actually Shift and F8) you will see that you changed the zip in all of the records with TN as CSSTE.
Are you starting to have fun? I hope so.

Using SDA to set up a User Menu in AS400

You are beginning to see how to create the different pieces of a complete system. You have written queries that display and print data, you know how to view printed data and you have written several small programs that can change data. After this topic, you will learn to write programs to display and change data interactively - data maintenance, entry, update and display. In this topic, you will use yet another three letter acronym, SDA, as a tool. You will also make a couple of changes to your user profile. The end result will be a user interface that you could use as an entry point to an application system. The user would sign on to the AS/400 and immediately see the user menu. The user would never see the AS/400 programmer and operator menus. In summary, here is the task:
1)  Create a menu named STARTMEN that will let the user:
  Run the display query that you wrote in Topic 6
  Run query to print a report from Topic 6
  Run the program to change the address line in the CUST file
  Display the CUST file using RUNQRY
  Display Print Spool files 
  Sign Off

2)  Change your user profile so that when you sign on, you see this new menu.  One of the 
most intuitive development tools on the AS/400 is SDA, Screen Design Aid. With it, you 
build display screens and menus in a WYSIWYG (what you see is what you get) mode. We're 
going to look at how easy it is to create a user menu. 

Start SDA with the command STRSDA. You will see that SDA has three functions:

      1)    Design Screens
      2)    Design Menus
      3)    Test Display Files
You'll want to experiment with each of these later. For now, use selection 2 to design a menu. Enter the name of your new menu, where you want to store the source (usually QDDSSRC) and the library that it will be in. SDA will look for that menu and since it can't find it, it will create it. Your screen should look like:


                                Design Menus                       
                                                                   
Type choices, press Enter.                                                                                                            
  Source file . . . . . . . .   QDDSSRC      Name, F4 for list                                                                        
    Library . . . . . . . . .   user999      Name, *LIBL, *CURLIB                                                                     
  Menu  . . . . . . . . . . .   startmen     Name, F4 for list     
Of course, replace USER999 with your user library name. When you hit ENTER you will see:

                           Specify Menu Functions                  
                                                                              
File  . . . . . . :   QDDSSRC                Menu . . . . . . . :   STARTMEN  
  Library . . . . :     USER999                                               
                                                                              
Type choices, press Enter.                                                    
                                                                              
  Work with menu image and commands  . . . . . .   Y   Y=Yes, N=No            
                                                                              
  Work with menu help  . . . . . . . . . . . . .   N   Y=Yes, N=No            
The AS/400 even fills in the "Y" to indicate that you want to work with menu images and commands.
Hit ENTER again and you see the following template menu.

STARTMEN                      STARTMEN Menu         
                                                    
Select one of the following:
     1.                                             
     2.                                             
     3.                                             
     4.                                             
     5.                                             
     6.                                             
     7.                                             
     8.                                             
     9.                                             
    10.                                             
 
                                                    
Selection or command                                
                                                     
SDA creates a template for you that has the menu name and a list of ten selections. On this screen, you list the selections for the user. On a separate screen, you list the commands associated with each selection. Avoid keying in "insert" mode since that will shift all text on the screen. To remove text, just space over it. So, key on the screen so that it looks like:

STARTMEN                      STARTMEN Menu       
                                                   
 Select one of the following:                      
                                                   
      1. Run Customer Query                        
      2. Print Customer Query                      
      3. Change Addresses in Customer file         
      4. Show Customer file                        
      5. Work with Print files                     
      6.                                           
      7.                                           
      8.                                           
      9.                                           
     10. Sign Off      
When you hit enter, SDA uses your screen to build literals in a display file. F20 (Shift and F8) provides a way to display the text blocks that SDA will use. Each text block is preceded by a hidden character that contains the display attribute for that string of text. If you key an "H" right in front of a block of text, SDA will display that text in high intensity or white characters. An "R" will display the text in reverse image. "D" will delete the text. Next, define the commands for each selection. Hit F10 to enter the commands. You now can key in the commands for selections 1 through 99. After hitting F10, you should see:

                            Define Menu Commands                    
                                                                    
Menu . . . . . . :   STARTMEN           Position to menu option . . 
                                                                    
Type commands, press Enter.                                         
                                                                    
Option   Command                                                    
  01                                                                
                                                                    
  02                                                                
                                                                    
  03                                                                
                                                                    
  04                                                                
                                                                    
  05                                                                
                                                                    
  06                                                                
                                                                    
  07                                                                
  
Here, you enter the commands associated with each selection. So enter the commands like this:

                            Define Menu Commands                 
                                                                 
Menu . . . . . . :   STARTMEN           Position to menu option .
                                                                 
Type commands, press Enter.                                      
                                                                 
Option   Command                                                 
  01     runqry csq001                                           
                                                                 
  02     runqry csq002                                           
                                                                 
  03     call tutr005                                            
                                                                 
  04     RUNQRY QRYFILE(CUST)                                        
                                                                 
  05     wrksplf                                                 
                                                                 
  06                                                             
                                                                 
  07                                                             
Then, hit page down so you can enter SIGNOFF as the command for selection 10. You can enter any command that you want the user to run. You can run queries, submit print queries to run in batch and use standard utility commands such as "Work with Spool Files", WRKSPLF. Finally, you can help the user navigate to another menu with the "GO" command used for selection 6. Hit F3 a few times to exit. When you exit SDA, check the "object library" name. This is where your compiled menu objects will go. Your screen should look like:

                                 Exit SDA Menus                               
                                                                              
 File  . . . . . . :   QDDSSRC             DDS member  . . . . . :   STARTMEN 
   Library . . . . :     USER999           Commands member . . . :   STARTMENQQ
                                                                              
 Type choices, press Enter.                                                   
                                                                              
   Save new or updated menu source  . . . .   Y            Y=Yes, N=No        
     For choice Y=Yes:                                                        
       Source file  . . . . . . . . . . . .   QDDSSRC      Name,              
                                                           F4 for list        
         Library  . . . . . . . . . . . . .   USER999      Name, *LIBL, *CURLI
       Text . . . . . . . . . . . . . . . .                                   
                                                                              
       Replace menu members . . . . . . . .   Y            Y=Yes, N=No        
                                                                              
   Create menu objects  . . . . . . . . . .   Y            Y=Yes, N=No        
     For choice Y=Yes:                                                        
       Prompt for parameters  . . . . . . .   N            Y=Yes, N=No        
       Object library . . . . . . . . . . .   USER999      Name, *CURLIB      
       Replace menu objects . . . . . . . .   Y            Y=Yes, N=No        
Wait! Let me say again - the value near the bottom of the screen - Object Library - must be your user library. Otherwise you will create your menu somewhere else. Hit enter and the AS/400 will compile your source code and your menu will be ready to run. SDA creates three objects, all with the same name: the commands, the display file and a message file for the menu. If you want some added fun, go back to the menu source using SDA and this time make the selection to "work with menu help". Here you can define help screens that will display if your user enters the selection number and hits F1. Now you can tie this menu to your new employee's user profile. Use the command to change your profile,CHGPRF. From a command line key CHGPRF and hit F4. You should see a screen like:

                            Change Profile (CHGPRF)                       
                                                                          
Type choices, press Enter.                                                
                                                                          
Assistance level . . . . . . . .   *SYSVAL       *SAME, *SYSVAL, *BASIC...
Current library  . . . . . . . .   *crtdft       Name, *SAME, *CRTDFT     
Initial program to call  . . . .   SOC000        Name, *SAME, *NONE       
  Library  . . . . . . . . . . .     SOLIB       Name, *LIBL, *CURLIB     
Initial menu . . . . . . . . . .   MAIN          Name, *SAME, *SIGNOFF    
  Library  . . . . . . . . . . .     *LIBL       Name, *LIBL, *CURLIB     
Text 'description' . . . . . . .   'your email address'                   
When you sign on to the AS/400, these values tell the operator what your current library should be and what menu is your default menu. Presently, your current library is probably *CRTDFT which is a system value that means "NONE". Your initial menu is named MAIN. This is the menu you have gotten accustomed to seeing when you sign on. Change your current library from *CRTDFT to your user library. Also change your initial menu to STARTMEN. Make the LIBRARY value under your initial menu your user library. Your screen should look like:

                            Change Profile (CHGPRF)                    
                                                                       
Type choices, press Enter.                                             
                                                                       
Assistance level . . . . . . . .   *SYSVAL       *SAME, *SYSVAL, *BASIC
Current library  . . . . . . . .   USER999       Name, *SAME, *CRTDFT  
Initial program to call  . . . .   SOC000        Name, *SAME, *NONE    
  Library  . . . . . . . . . . .     SOLIB       Name, *LIBL, *CURLIB  
Initial menu . . . . . . . . . .   STARTMEN      Name, *SAME, *SIGNOFF 
  Library  . . . . . . . . . . .     USER999     Name, *LIBL, *CURLIB  
Text 'description' . . . . . . .   'your email address'                
If you sign off and sign back on, you will see your new menu. By the way, if you set it up wrong, you may have to e-mail me to reset your profile. For example, if you changed your profile to run the menu ABCDEF as the initial menu, the AS/400 won't know what to do (since there is no ABCDEF menu). If you want to see the familiar sign on screen, key in the command GO MAIN. It's that easy to customize the screen selections for a user.

Using SDA to set up a simple Help Screen in AS400

One of the most intuitive development tools on the AS/400 is SDA, Screen Design Aid. With it, you build display screens and menus in a WYSIWYG (what you see is what you get) mode. We're going to look at how easy it is to create a simple help screen.
In only a few minutes, you can build a custom help screen for your user. Start SDA with the command STRSDA. You will see that SDA has three functions:
1)    Design Screens
2)    Design Menus
3)    Test Display Files

Use selection 2 to design a menu. Enter the name of your menu, where you have stored the source (usually QDDSSRC) and the library that it is in.
Now choose the selection to "Work with menu help" by changing the "N" to a "Y". Here you can define help screens that will display if your user enters a selection number and hits F1.
This is where you will "Create" the text for your help screen. You will also have 3 Range Options to choose from.
Valid ranges are:                     
00-00    General help for the entire menu. 
nn-nn    Where nn is a number between 01 and 99.  This is specific help for one option of
         the menu.              
nn-mm    Where nn is a number between 00 and 99 and mm is a number between 01 and 99 and 
         is greater that nn.  This is help for a range of options on your menu.           

Note:  You cannot create more than a single page of help for each range of options.              
You will see this screen displayed. Type in a 1 for Create in the Opt field, and 01 - 01 in the Range field. The 01 is only used for Selection 1 of your main menu selection. Option 02 is for Selection 2, etc..
                          Work with Menu Help Records                          
                                                                               
 File  . . . . . . :   QDDSSRC                Menu . . . . . . . :   MRCM001  
   Library . . . . :     User999                                                   
                                                                               
 Type options (and Range), press Enter.                                        
   1=Create          3=Copy           4=Delete            12=Update            
                                                                               
 Opt   Range     Text                                                          
 ___   __ - __                                                                    
                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                  
     
                                                                         Bottom
 F3=Exit     F5=Refresh     F9=Display image      F12=Cancel                   
                                                                               


                             Create Menu Help Record                         
                                                                             
 File  . . . . . . :   QDDSSRC                Menu . . . . . . . :   MRCM001
   Library . . . . :     USER999                                               
                                                                             
 Type choices, press Enter.                                                  
                                                                             
   Create help for option  . . . . . . . . . . . . . . .  01   01-99        
                                                                             
   -OR-                                                                      
                                                                             
   Create help for option range (range xx-yy)                                
     From menu option  . . . . . . . . . . . . . . . . .  ___   00-99        
     To menu option  . . . . . . . . . . . . . . . . . .  ___   01-99        
                                                                             
   -OR-                                                                      
                                                                             
   Create general help (range 00-00) . . . . . . . . . .   N    Y=Yes, N=No  
                                                                             
                                                                             
                                                                             
                                                                             
 F3=Exit     F5=Refresh     F9=Display image      F12=Cancel                 

From here, you will press Enter, a blank screen will appear and now you can type in the text
you want for your help screen.

Once you have created the text help for each option you chose, you should see the following
screen with your enhancements:

Work with Menu Help Records                          
                                                                               
 File  . . . . . . :   QDDSSRC                Menu . . . . . . . :   MRCM001  
   Library . . . . :     User999                                                   
                                                                               
 Type options (and Range), press Enter.                                        
   1=Create          3=Copy           4=Delete            12=Update            
                                                                               
 Opt   Range     Text                                                          
          -                                                                    
       01 - 01   Run Customer Query                                            
       02 - 02   Print Customer Query                                          
       03 - 03   Change Address in Customer File                               
       04 - 04   Show Customer File                                            
       05 - 05   Work with Printer Files                                       
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                         Bottom
 F3=Exit     F5=Refresh     F9=Display image      F12=Cancel  
When you exit SDA, check the "object library" name. This is where your compiled menu objects will go. Hit enter and the AS/400 will compile your source code and your menu will be ready to run. SDA creates three objects, all with the same name: the commands, the display file and a message file for the menu. When you run the menu you have created, type in selection 1 and press F1, when you do this you will see the following help screen.

HELP                  Running Customer Query Information                  
                                                                          
                                                                          
      This option will run the Customer Query.  The information of        
      this query will show you the Customer Name, Customer Number         
      and Address.                                                        
                                                                          
                                                                          
                                                                          
                                                                          
      Hit F3 to Exit, and Enter to run query.                             
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
F3=Exit   F12=Cancel 
 
You can also use SDA to test and design display files. With the "Test Display Files" selection of SDA, you can see the fields and presentation of a display file. This works even if you don't have the source code.

Selasa, 01 Desember 2015

ZbigZ- Easily Download Torrent Files Without Any Dedicated Torrent Client

Despite the fact that, there are an astronomical number of torrent clients available in the market for most popular OS, there’s an entire community which prefers no dedicated torrent clients. Ingenious developers planned to bequeath users with relatively more simpler options. This gave birth to Torrent2exe and many other clients which no longer relies on dedicated torrent clients. However, something was still lacking. ZbigZ, a cloud based service, changed a perception about such third-party alternatives. ZbigZ brings unique unparalleled power of cloud service and torrents together to bring you the fastest ever possible download speed.
First of all, users can download torrent files from zbigz as a .zip content. The biggest advantage of such facility is that you would be able to download those .zip files offered by ZbigZ through third-party download manager which will further improve your experience. Download manager applications like IDM (Internet download manager) and FDM (Free Download Manager) integrates themselves with the browser. Linux users may want to check out our previous collection of download manager for them. Secondly, there might be instances where your ISP has blocked some torrents, and you have a withering hope to get your favorite movie, software, book from it. In such case, pragmatic cloud based Zbigz comes in handy by empowering you. No longer do you need to depend on them. Just grab the torrent or magnet link and place it in “Upload .torrent file” and wait for the magic to happen.

TL;DR

  1. Provide magnet link or upload torrent
  2. Select Free or Premium
  3. Download the .zip file
They say,
A Picture is worth a thousand words
Here is a simple image that illustrates what zbigz does.
zbigz download

Features of ZbigZ

ZbigZ is a great service with some mind-boggling features that are too good to believe. There is a catch, which is mentioned below the features OL list.
  • Download hundreds and thousands of movies, music, books and albums without any fuss
  • Unrestricted access even if your ISP has blocked torrent sites (learn how to unblock sites blocked by ISP)
  • HTTPS protocol for secure downloading.  Hide IP trace
  • No installation or configuration required
  • Almost as fast as BitTorrent
  • Use in conjunction with download manager like IDM, FDM for faster download
  • Video and music streaming (also see how to watch blocked YouTube video)
  • Download playlist
  • Mobile site for mobile downloads
  • No operating system dependency since it is a browser based
No more hassle of complexity involved in configuring router and firewall for optimum performance. People say, there’s no free lunch in the world. Well, they are wrong. ZbigZ is free to use. However, they have impoverished the functionality for free surfer. Users will no account will not have any option to store the file. The streaming service, torrent caching, unlimited download speed, simultaneous connections and maximum size come under pro (read paid) category. Android fanatics might want to take a look at our android torrent clients collection.
They gave some respite to registered users. You can download torrent of 8GB size with 150KBps speed limit. Even, the files will be available for 7 days in your account. So we strongly recommend you to register an account there. Premium plans start at $9.90 per month. There is also an option to earn free premium accounts upon completion of certain tasks. CashU, MOL users get a 50% discount on the package. Do take advantage of this discount if you are using the aforementioned services.

How to Use ZbigZ

Using a ZbigZ is a child’s play. As mentioned earlier, it abrogates all complexity involved in configuring the router and firewall for optimum performance. Let’s see how easy this tool is to handle. We’ve also provided an awesome collection of ZbigZ alternative clients.
Step 1: Go to ZbigZ.com
Step 2: Paste magnet link or upload .torrent file in the field. See the screenshot below to understand the phenomenon. Press Go button
torrent file uploading
zbigz magnet guide
Step 3: You will be presented with two options—Free and Paid. Select the appropriate option by clicking on Cloud like image.
free zbigz or paid account
Step 4: Wait for zbigz to cache the torrent file. It will display the number of files as well.
caching torrents
Step 5: Depending on available seeders the caching will take some time. Once done, you will be presented with the following option. You can also download files individually.
downloading file from zbigz
Step 6: Click on Zip or download like arrow to download files on your PC. Don’t worry if you see your browser busy. Also do not close the tab.
downloading torrent with zbig
Note: Oftentimes, ZbigZ.com takes intolerably high time in zipping file. This is why we do not recommend downloading small files using it. Normal torrent clients perform better in such case.
Optional step
Step 7: Use IDM or FDM to fasten the process. You can get them easily from the popular downloading website. FDM is a free program while IDM is a paid download manager with many advanced features.

Our Review

Overall, ZbigZ makes us happy to see the development in cloud segment. The cunning idea of integrating torrents with cloud brings a new hope. Unfortunately, some of the processes are tiresome. During the testing, we find that ZbigZ often often failed to resolve a magnet link, or the time was extremely high. Uploading a .torrent file was much more straight forward and was working as advertised.
However, the biggest let down was the speed. For ~1.5MB file, I had to wait for 25 odd minutes or so. You can even check out the screenshot of terrible speed (3.2KB) I got during the testing. As we write, we are using 1MBPS connection at our office. It could either be due to some hiccups on their server side or something was wrong with the connection. There’s a less chance of the latter part since other services were working just fine. Let’s hope that the service will only improve as time passes by.
Additionally, you can pause and resume the download with such tools. This is why we always recommend to speed up things a bit.

Should you have any problem using ZbigZ to download torrent files, feel free to contact their support system :).


source: http://geniusgeeks.com/zbigz/