Unformatted text preview:

CIS 808 Special Topics: AS/400 Exercise 1 exer01.docBodnovich CRTSRCPF, CPYF, STRSEU page 1 of 3In this exercise you will change your password, create a source physical file, copy a member source program into your file, and edit the copied source program. Sign on to the AS/400. Refer to the handout titled Sign On, Menus, Commands, Help. Your account number and password are not case sensitive.Change your password. Select the “User tasks” option from the Main Menu. Select the “Change your password” option from the User Tasks menu. You should now see the Change Password entry screen. Type your current password and your new password (the new password must be typed in two fields). You may use the tab key to advance the cursor. After typing your passwords press enter. The User Tasks menu should be redisplayed with the message “Password changed successfully”.Create a source physical file in your library with a name of QRPGSRC. You will use this file store the source code of some RPG programs. An example of using the CRTSRCPF (create source physical file) is is in the handout Sign On, Menus, Commands, Help.The file you have created in your library is empty. In the next step you will copy a member from a source physical file in another library into your QRPGSRC source physical file.Copy a member from one source physical file into another source file using the CPYF (copy file) command. The member you want to copy is named SAMPRPG and it is located in the QRPGSRC file in the RPGSHARE library. Copy it into the QRPGSRC file you created in the prior step. When you issue the CPYF command, you will see the following screen. Copy File (CPYF) Type choices, press Enter. From file . . . . . . . . . . . QRPGSRC Name Library . . . . . . . . . . . RPGSHARE Name, *LIBL, *CURLIB To file . . . . . . . . . . . . QRPGSRC Name, *PRINT Library . . . . . . . . . . . *CURLIB Name, *LIBL, *CURLIB From member . . . . . . . . . . SAMPRPG Name, generic*, *FIRST, *ALL To member or label . . . . . . . *FROMMBR Name, *FIRST, *FROMMBR Replace or add records . . . . . *ADD *NONE, *ADD, *REPLACE... Create file . . . . . . . . . . *NO *NO, *YES Print format . . . . . . . . . . *CHAR *CHAR, *HEX Bottom F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys Parameter FROMFILE required. +You must enter the source file name, source library name, target file name, and target library name. The reserved word *CURLIB refers to your current library. The reserved word *FROMMBR specifies that you want to use the same member name in the target file that is used in the source file. The reserved word *ADD specifies that this is a new member in the target file. After you have typed in all parameters, press enter to execute the copy command. After the command executed you should receive the message “Member SAMPRPG added to file QRPGSRC in <your library>.The final step of this exercise will be to edit the member you just copied.Edit a source program. Program editing is performed with the Source Entry Utility. You invoke this utility by typing STRSEU at the command line and pressing F4 to prompt for parameters as illustrated below.CIS 808 Special Topics: AS/400 Exercise 1 exer01.docBodnovich CRTSRCPF, CPYF, STRSEU page 2 of 3MAIN AS/400 Main MenuSelect one of the following: 1. User tasks 2. Office tasks 3. General system tasks 4. Files, libraries, and folders 5. Programming 90. Sign off Selection or command ===> STRSEU <press F4> F3=Exit F4=Prompt F9=Retrieve F12=Cancel F13=Information Assistant F23=Set initial menuStart Source Entry Utility (STRSEU) Type choices, press Enter. Source file . . . . . . . . . . QRPGSRC Name, *PRV Library . . . . . . . . . . . *CURLIB Name, *LIBL, *CURLIB, *PRV Source member . . . . . . . . . *SELECT Name, *PRV, *SELECT Source type . . . . . . . . . . *SAME Name, *SAME, BAS, BASP... Option . . . . . . . . . . . . . *BLANK *BLANK, ' ', 2, 5, 6 Text 'description' . . . . . . . *BLANKF3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys*CURLIB refers to your current library and *SELECT requests a list of all members. You should only see one member in your list, the member which you copied. Work with Members Using SEUSource file . . . . . . QRPGSRC Library . . . <your library.Position to . . . . . . . . . . . . . . . . . . . . . . . . . . . .New member . . . . . . . . . . . . . . . . . . . . . . . . . . . . Type for new member . . . . . . . . . . . . . . . . . . . . . . . TXT Text . . . . . . . . .Type options, press Enter. 2=Edit 4=Delete 5=Browse 6=PrintOpt Member Type Text 2 SAMPRPG RPG SAMPLE PROGRAM FOR SPECIAL TOPICSNotice that option 2 specifies edit. Type a 2 next to the member name of SAMPRPG and press enter to edit this program. You should see the following screen.CIS 808 Special Topics: AS/400 Exercise 1 exer01.docBodnovich CRTSRCPF, CPYF, STRSEU page 3 of 3Columns . . . : 1 71 Edit <your library>/QRPGSRC SEU==> SAMPRPG FMT F .....FFilenameIPEAF....RlenLK1AIOvKlocEDevice+......KExit++Entry+A....U *************** Beginning of data ************************************* * * <your name> *0001.00 FCSCSTP IF F 0099 DISK0002.00 FQPRINT O F 0132 OA PRINTER0003.00 ICSCSTP NS 010004.00 I 1 60CUSTNO0005.00 I 7 16 CFNAME0006.00 I 17 31 CLNAME0007.00 I 32 51 CSTRET0008.00 I 52 66 CCITYO0009.00 I 67 68 CSTATE0010.00 I 69 770CZIP0011.00 I 78 870CPHONE0012.00 I 88 930ORDATE0013.00 I


View Full Document

YSU CIS 808 - Exercise 1

Download Exercise 1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Exercise 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Exercise 1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?