• No se han encontrado resultados

Información fundamental sobre la ejecución del Programa y sus prioridades

value. For example, the following CRTUSRSPC command creates a user space named DynoRama in QTEMP with a size of 32 bytes and makes it auto-extendable.

CRTUSRPSC USRSPC(QTEMP/DYNORAMA) SIZE(32) AUTOEXT(*YES)

CMD PROMPT('Create User Space')

/* Command processing program is RTKCRTUS */ PARM KWD(USRSPC) TYPE(QUAL) MIN(1) + PROMPT('User Space')

QUAL TYPE(*NAME) MIN(1) EXPR(*YES)

QUAL TYPE(*NAME) DFT(*CURLIB) SPCVAL((*LIBL) + (*CURLIB)) EXPR(*YES) PROMPT('Library') PARM KWD(SIZE) TYPE(*INT4) DFT(32766) REL(*GT 0) + PROMPT('Size')

PARM KWD(OBJATR) TYPE(*CHAR) LEN(10) EXPR(*YES) + PROMPT('Object attribute')

PARM KWD(AUTOEXT) TYPE(*LGL) RSTD(*YES) + DFT(*YES) SPCVAL((*YES '1') (*NO '0')) + EXPR(*YES) PROMPT('Auto extend')

PARM KWD(INZ) TYPE(*CHAR) LEN(1) RSTD(*NO) + DFT(*NULL) SPCVAL((*NULL X'00') + (*BLANK ' ')) EXPR(*YES) +

PROMPT('Initialization character') PARM KWD(AUT) TYPE(*CHAR) LEN(10) RSTD(*YES) + DFT(*LIBCRTAUT) SPCVAL((*LIBCRTAUT) + (*CHANGE) (*EXCLUDE) (*USE) (*ALL)) + EXPR(*YES) PROMPT('Authority')

PARM KWD(REPLACE) TYPE(*CHAR) RSTD(*YES) DFT(*NO) + SPCVAL((*NO) (*YES)) EXPR(*YES) +

PROMPT('Replace')

PARM KWD(TEXT) TYPE(*CHAR) LEN(50) DFT(*BLANK) + SPCVAL((*BLANK ' ')) EXPR(*YES) +

PROMPT('Text ''description''') PARM KWD(DOMAIN) TYPE(*CHAR) RSTD(*YES) + DFT(*DEFAULT) SPCVAL((*DEFAULT) (*USER) + (*SYSTEM)) EXPR(*YES) PROMPT('Domain')

Figure 2: This is the command definition source for the CRTUSRSPC command.

To compiler the command definition source listed in Figure 2, specify the following CRTCMD command: CRTCMD CMD(CRTUSRSPC) PGM(mylib/RTKUSRSPC)

Be sure to replace MYLIB with the name of the library where you've compiled the RTKCRTUS program. The source code listed in Figure 3 is the CPP for the CRTUSRSPC command. The first few dozen lines are declarations, prototypes for the APIs that are called, and the procedure interface for the program itself. Note that I avoid using the outdated *ENTRY/PLIST opcodes and instead use a procedure interface. The RTKCRTUS program is fairly straight forward; it calls just two APIs: QUSCRTUS to create the user space and then QUSCUSAT to set the auto-extendability attribute for the user space.

Before running the DYNARR program from Figure 1, be sure to compile and run the CRTUSRSPC command to create the user space.

DFTACTGRP(*NO) rtkcrtus PR szUserSpace 20A nUSSize 10I 0 szExtAttr 10A bAutoExtend 1N InitValue 1A szPubAut 10A zReplace 10A szText 50A szDomain 10A

QusCRTUS PR ExtPgm('QUSCRTUS') UsrSpace 20A Const

ExtAttr 10A Const nSize 10I 0 Const InitValue 1A Const PubAuth 10A Const szTextDesc 50A Const Replace 10A Const

api_error Like(apiError) OPTIONS(*NOPASS) szDomain 10A Const OPTIONS(*NOPASS)

QusCUSAT PR ExtPgm('QUSCUSAT') RtnLibName 10A

UsrSpace 20A Const

USAttr 64A OPTIONS(*VARSIZE) api_error Like(apiError) rtkcrtus PI szUserSpace 20A nUSSize 10I 0 szExtAttr 10A bAutoExtend 1N InitValue 1A szPubAut 10A szReplace 10A szText 50A szDomain 10A apiError DS Inz

apiLen 10I 0 Inz(0) apiRLen 10I 0 apiMsgID 7A

apiResv1 1A Inz(X'00') apiErrText 24A

rtnLib S 10A The QUSCUSAT data structure

This one is setup up only to change the auto-extendibility option to '1'. erSpaceAttr DS ALIGN nRecdCount 10I 0 Inz(1) nAttrKey 10I 0 Inz(3)

nAttrLen 10I 0 Inz(%Size(bExtend)) bExtend 1A Inz('1')

eval *INLR = *ON

Callp QusCRTUS(szUserSpace:szExtAttr: nUSSize : InitValue : szPubAut : szText : szReplace : apiError : szDomain )

if apiRLen = 0 and bAutoExtend Change the user space to AutoExtend

CallP QusCUSAT(rtnLib : szUserspace : UserSpaceAttr : apiError) endif

return

Figure 3: Here's the RPG IV source for the RTKCRTUS program of the CRTUSRSPC command.

Batch Job and LDA

1. Can you be a little more specific about where/when/how you want to retrieve this LDA data? Basically you can use the LDA in a batch job exactly the same as you would in an interactive job. You can use the change variable (CHGVAR) in CL and move the value from the LDA into a CL variable or you can define the LDA field positions in an RPG(LE) program using UDS and use them in the program.

2. We stored some values in LDA using our current job interactively. Then submitted a batch job. Now that batch job should

retrieve the values from LDA of interactive job. Is it possible ? If yes How? Any one can provide me some solution for this.

3. Thanks for your information. I understand that. But my question is as LDA is created for every job how can an

is LDA1. When i submitted a batch job, LDA2 will be created for batch job. How can i retrieve the values from LDA1 in the batch job? Hope i am clear with my question this time. If my concept is wrong, please don't hesitate to correct me. Passing parameters from a Local Data Area (LDA) * post #5541 * CLKelly on 09/14/2004

"Since the LDA in its current state is passed with the submit job command, all you need is to retrieve the portions you need: CHGVAR VAR(&parm1) VALUE(%SST(*LDA 1 10)) (Where 1 is the starting position and 10 is the length.) CALL PGM(program)..."

Author: ed Return to Forum 2005-06-07 09.03.31

You don't need to "pass" a data area to a batch job, unless you are using the *LDA, which Jean-Marc is correct, that is old 36 mentality. The *LDA will follow the job. A batch job can access a data area any where, at any time. Use the RTVDTAARA command in your CLLE and put into a variable defnied

Author: Jean-Marc Return to Forum 2005-06-07 01.38.50

*LDA is a temporary data area attached to the job.It comes from the S36 environment history.The other data areas are normal objects, located in libraries. *LDA is transmitted when you submit a job. But why do you need a data area to transmit informations to the batch job ?

Author: Doldrums Return to Forum 2005-06-07 01.12.45

When do we use *LDA data area & when do we use the other data area's. Also how do i pass a data area from an interactive job to a batch Job.

If you execute DO loop to 20001 instead of 50 times, this program will give error because array dimension is fixed at 20000. program is allocating more memory to array but it dimensions is fixed to 20000. I want to increase its dimension at run time from 20000.

define the array as based. Here is an example. ? * array definitions

Darray S 10 DIM(20000) BASED(PTR) Dindex s 7 0

? * memory allocation data items Dptr S *

Dnbr_of_elems S 5 0 INZ(10) Dmem_size S 7 0 INZ Dx S 10i 0

? * allocate the initial memory heap (initial # of elements * the size of the array)

C EVAL mem_size = %size(array) * nbr_of_elems C ALLOC mem_size ptr

C EVAL x = %elem(array) ? * loop to test

? C 1 DO 50 index

? * does the index exceed the current # of array elements? ? C IF index > nbr_of_elems

? * recalculate the memory heap size by adding 10 to the number of elements

? * and multiplying the size of the array by the new number of elements.

C EVAL nbr_of_elems = nbr_of_elems + 10

C EVAL mem_size = %size(array) * nbr_of_elems ? * reallocate the memory heap and increase the size

C REALLOC mem_size ptr ? C ENDIF

? * move data for test

C MOVE index array(index) ? *

? C ENDDO

C DEALLOC ptr C EVAL *inlr = *on

How do I access another jobs QTEMP?

From an email by Larry Ducie available in the rpg400 archives at: http://archive.midrange.com/rpg400- l/200505/msg00297.html

Chaps,

I've just reviewed the code and it's more simple than I remembered - 4 CLLE programs and three commands. They're all very small so I'll post all 7 at the foot of this mail. (I hope you don't mind David - and apologies to all, but there's nothing worse than looking for something in the archives and all you find are references of source passed off-list) First - an overview of how it works: To get started quickly all objects must be compiled into library JOBCMDLIB. This is because it's hard-coded. But as you now have the source, you can do what you want. :-)

Basically, it works by starting a job trace on the job you are investigating. When starting a trace you can specify an exit program. As this exit program is invoked WITHIN the environment of the job being traced it can be used as a hook within the job. Every time a traceable event occurs within the job it will call this program. By default this program marks the trace as processed and discards it - so an actual trace is not generated. You can optionally specify whether you wish to service this job - good for debugging.

When you issue command STRJOBCMD it starts a trace, and registers program EXITTRC. It also creates a message queue in library JOBCMDLIB that uniquely references that job. Every time the exit program is called it looks for entries on that mesage queue and passes the command on it directly to QCMDEXC. This allows you to run commands within that job - using the job's user profile!

When you issue command SNDJOBCMD it lets you create a command string and then passes it to the message queue created for the job you're tracing. Next time it generates a traceable event it executes your command. It's as simple as that!

When you issue command ENDJOBCMD it ends the trace. You can specify whether you wish to end the service of the job too - good if you're servicing and debugging the job and wish to keep debugging.

That's it.

To create the commands:

create a library called JOBCMDLIB

compile the four CLLE programs into library JOBCMDLIB.

compile the three commands into library JOBCMDLIB, specify the CLLE of the same name as the processing program. You will also need to create a message queue called CMDLOG in library JOBCMDLIB. This will log all commands sent to jobs via this route. This is important as there is practically no way of knowing somebody is doing this. You can piggyback one job after another and then it'd be almost impossible to trace the fact that actions invoked within one job was actually caused by another user running another job.

Finally, here's a good test: Start two sessions.

Leave session 1 on a command line.

Add JOBCMDLIB to the library list of session 2 and issue command STRJOBCMD - enter the job details of session 1, and opt to service the job.

In session 2 issue command SNDJOBCMD and place the job details of session 1 again. This time type a call command to your favourite interactive screen program.

Simply press Enter in session 1.

The program should be called, and the screen should appear.

Have fun! (I've copy 'n' pasted the source into the mail so I hope it formats OK). I'll try and set up a savf to download on my website.

Cheers Larry Ducie Source: 1) STRJOBCMD - CLLE 2) SNDJOBCMD - CLLE 3) ENDJOBCMD - CLLE 4) EXITTRC - CLLE 5) STRJOBCMD - CMD 6) SNDJOBCMD - CMD 7) ENDJOBCMD - CMD --- 1) STRJOBCMD - CLLE /* **************************************************************** */ PGM PARM(&JOB &SRVJOB)

DCL VAR(&JOB) TYPE(*CHAR) LEN(26) DCL VAR(&NAME) TYPE(*CHAR) LEN(10) DCL VAR(&USER) TYPE(*CHAR) LEN(10) DCL VAR(&NUMBER) TYPE(*CHAR) LEN(6) DCL VAR(&SRVJOB) TYPE(*CHAR) LEN(1) DCL VAR(&MSGQ) TYPE(*CHAR) LEN(10)

/* Extract job details... */ CHGVAR VAR(&NAME) VALUE(%SST(&JOB 1 10))

CHGVAR VAR(&USER) VALUE(%SST(&JOB 11 10)) CHGVAR VAR(&NUMBER) VALUE(%SST(&JOB 21 6))

/* Service job..? */ IF COND(&SRVJOB *EQ 'Y') THEN(DO)

STRSRVJOB JOB(&NUMBER/&USER/&NAME)

/* Job does not exist... */ MONMSG MSGID(CPF3520) EXEC(DO)

SNDPGMMSG MSG('The job you are trying to send a + command to does not exist') TOPGMQ(*PRV) GOTO CMDLBL(END)

ENDDO

/* Job already being serviced... */ MONMSG MSGID(CPF3501) EXEC(DO)

SNDPGMMSG MSG('Job is already being serviced, traced + or debugged') TOPGMQ(*PRV)

GOTO CMDLBL(END) ENDDO

/* Already servicing another job... */ MONMSG MSGID(CPF3938) EXEC(DO)

SNDPGMMSG MSG('You are already servicing another job') + TOPGMQ(*PRV)

GOTO CMDLBL(END) ENDDO

/* General errors... */ MONMSG MSGID(CPF3500) EXEC(DO)

SNDPGMMSG MSG('An error occurred when trying to + service the job. See joblog for + details.') TOPGMQ(*PRV)

GOTO CMDLBL(END) ENDDO

ENDDO

/* Create message queue... */ CHGVAR VAR(&MSGQ) VALUE('SRVJ' *CAT &NUMBER)

CRTMSGQ MSGQ(JOBCMDLIB/&MSGQ) MONMSG CPF9999

/* Set trace... */ TRCJOB EXITPGM(JOBCMDLIB/EXITTRC)

MONMSG CPF9999 EXEC(DO)

SNDPGMMSG MSG('An error occurred when trying to + trace the job. See joblog for + details.') TOPGMQ(*PRV)

IF COND(&SRVJOB *EQ 'Y') THEN(DO) ENDSRVJOB MONMSG MSGID(CPF9999) ENDDO DLTMSGQ MSGQ(JOBCMDLIB/&MSGQ) MONMSG CPF9999 GOTO CMDLBL(END) ENDDO END: ENDPGM --- 2) SNDJOBCMD - CLLE /* **************************************************************** */ PGM PARM(&JOB &CMD)

DCL VAR(&JOB) TYPE(*CHAR) LEN(26) DCL VAR(&NAME) TYPE(*CHAR) LEN(10) DCL VAR(&USER) TYPE(*CHAR) LEN(10) DCL VAR(&NUMBER) TYPE(*CHAR) LEN(6) DCL VAR(&CMD) TYPE(*CHAR) LEN(512) DCL VAR(&MSGQ) TYPE(*CHAR) LEN(10)

/* Extract job details... */ CHGVAR VAR(&NAME) VALUE(%SST(&JOB 1 10))

CHGVAR VAR(&USER) VALUE(%SST(&JOB 11 10)) CHGVAR VAR(&NUMBER) VALUE(%SST(&JOB 21 6))

/* Send command to message queue... */ CHGVAR VAR(&MSGQ) VALUE('SRVJ' *CAT &NUMBER)

SNDPGMMSG MSG(&CMD) TOMSGQ(JOBCMDLIB/&MSGQ) MONMSG MSGID(CPF2469) EXEC(DO)

SNDPGMMSG MSG('An error occured while sending the + command. Please re-enter the details.') GOTO CMDLBL(END) ENDDO END: ENDPGM --- 3) ENDJOBCMD - CLLE /* **************************************************************** */ PGM PARM(&JOB &SRVJOB)

DCL VAR(&JOB) TYPE(*CHAR) LEN(26) DCL VAR(&NAME) TYPE(*CHAR) LEN(10) DCL VAR(&USER) TYPE(*CHAR) LEN(10) DCL VAR(&NUMBER) TYPE(*CHAR) LEN(6) DCL VAR(&SRVJOB) TYPE(*CHAR) LEN(1) DCL VAR(&MSGQ) TYPE(*CHAR) LEN(10)

/* Extract job details... */ CHGVAR VAR(&NAME) VALUE(%SST(&JOB 1 10))

CHGVAR VAR(&USER) VALUE(%SST(&JOB 11 10)) CHGVAR VAR(&NUMBER) VALUE(%SST(&JOB 21 6))

/* End trace... */ TRCJOB SET(*END)

MONMSG CPF9999

/* End service job... */ IF COND(&SRVJOB *EQ 'Y') THEN(DO)

ENDSRVJOB

MONMSG CPF9999 ENDDO

/* Delete message queue... */ CHGVAR VAR(&MSGQ) VALUE('SRVJ' *CAT &NUMBER)

DLTMSGQ MSGQ(JOBCMDLIB/&MSGQ) MONMSG CPF9999 ENDPGM --- 4) EXITTRC - CLLE PGM PARM(&TRCDTA)

DCL VAR(&TRCDTA) TYPE(*CHAR) LEN(1024) DCL VAR(&CMD) TYPE(*CHAR) LEN(1024)

DCL VAR(&LEN) TYPE(*DEC) LEN(15 5) VALUE(512) DCL VAR(&MSGTXT) TYPE(*CHAR) LEN(512)

DCL VAR(&NAME) TYPE(*CHAR) LEN(10) DCL VAR(&USER) TYPE(*CHAR) LEN(10) DCL VAR(&NUMBER) TYPE(*CHAR) LEN(6) DCL VAR(&MSGQ) TYPE(*CHAR) LEN(10) DCL VAR(&SENDER) TYPE(*CHAR) LEN(80) DCL VAR(&LOG) TYPE(*CHAR) LEN(512)

/* Set trace record as processed... */ CHGVAR VAR(&TRCDTA) VALUE(' ')

/* Retrieve job attributes... */ RTVJOBA JOB(&NAME) USER(&USER) NBR(&NUMBER)

/* Receive message from queue... */ CHGVAR VAR(&MSGQ) VALUE('SRVJ' *CAT &NUMBER)

RCVMSG MSGQ(JOBCMDLIB/&MSGQ) MSG(&MSGTXT) + SENDER(&SENDER)

MONMSG MSGID(CPF9999) EXEC(GOTO CMDLBL(END))

/* Set command... */ CHGVAR %SST(&CMD 1 1024) %SST(&MSGTXT 1 &LEN )

/* Send log messages, if message received... */ IF COND(&MSGTXT *NE ' ') THEN(DO)

CHGVAR VAR(&LOG) VALUE(&SENDER *CAT &NAME *CAT + &USER *CAT &NUMBER)

SNDPGMMSG MSG(&LOG) TOMSGQ(JOBCMDLIB/CMDLOG) CHGVAR VAR(&LOG) VALUE(&CMD)

SNDPGMMSG MSG(&LOG) TOMSGQ(JOBCMDLIB/CMDLOG) MONMSG CPF0000

/* Call QCMDEXC to process command... */ CALL PGM(QCMDEXC) PARM(&CMD &LEN)

MONMSG CPF0000 ENDDO

END: ENDPGM

--- 5) STRJOBCMD - CMD

PARM KWD(JOB) TYPE(Q1) MIN(1) PROMPT('Job name . + . . . .')

PARM KWD(SRVJOB) TYPE(*CHAR) LEN(1) RSTD(*YES) + DFT(Y) VALUES(Y N) CHOICE('(Y/N)') + PROMPT('Service Job . . . .') /*********************************************************************/ Q1: QUAL TYPE(*NAME) LEN(10) MIN(1) CHOICE('Name') QUAL TYPE(*NAME) LEN(10) MIN(1) CHOICE('User') + PROMPT('User . . . .') QUAL TYPE(*CHAR) LEN(6) RANGE(000000 999999) + MIN(1) CHOICE('000000-999999') +

PROMPT('Number . . . .')

--- 6) SNDJOBCMD - CMD

CMD PROMPT('Send Job Command')

PARM KWD(JOB) TYPE(Q1) MIN(1) PROMPT('Job name . + . . . .')

PARM KWD(CMD) TYPE(*CMDSTR) LEN(512) MIN(1) + CHOICE('Command') +

PROMPT('Command . . . .') /*********************************************************************/ Q1: QUAL TYPE(*NAME) LEN(10) MIN(1) CHOICE('Name') QUAL TYPE(*NAME) LEN(10) MIN(1) CHOICE('Name') + PROMPT('User . . . .') QUAL TYPE(*CHAR) LEN(6) RANGE(000000 999999) + MIN(1) CHOICE('000000-999999') +

PROMPT('Number . . . .')

--- 7) ENDJOBCMD - CMD

CMD PROMPT('End Job Command Processing')

PARM KWD(JOB) TYPE(Q1) MIN(1) PROMPT('Job name . + . . . .')

PARM KWD(SRVJOB) TYPE(*CHAR) LEN(1) RSTD(*YES) + DFT(Y) VALUES(Y N) CHOICE('(Y/N)') + PROMPT('End service job . . . .') /*********************************************************************/ Q1: QUAL TYPE(*NAME) LEN(10) MIN(1) CHOICE('Name') QUAL TYPE(*NAME) LEN(10) MIN(1) CHOICE('User') + PROMPT('User . . . .') QUAL TYPE(*CHAR) LEN(6) RANGE(000000 999999) + MIN(1) CHOICE('000000-999999') +

PROMPT('Number . . . .')

Understanding Object Authorities Introduction

To maintain security of data and/or program objects the AS/400 offers a variety of options available to limit access to object. These authorities must be set to secure object to the level of security required. Likewise, if objects are to be shared or used between users, the object authorities must be relaxed correctly to maintain object integrity. This section is designed to help users maintain correct authorities and to understand the authorities on the objects that they own.

Authorities and their meanings Object Authorities

Object authority is used to control access to an object including the ability to see an object description, control read and write access to an object, or control an object's existence.

provides the authority to specify the security (grant/revoke object authority), move or rename the object, and add members to database file.

*OBJEXIST

provides the authority to control the object existence and ownership. The user with this authority can delete, save, and transfer ownership of the object.

*OBJOPR

provides the authority to look at the description of an object and use the object as determined by the data authority that the user has to the object.

Data Authorities

Data authority is the authority to access data contained in an object, for example records in a database file. This includes the ability to view, update, add, or delete records.

*READ

provides the authority to get the contents or an entry in an object or to run a program. *ADD

provides the authority to add entries to an object. *UPD

provides the authority to change the entries in an object. *DLT

provides the authority to remove entries from an object. Combinations of Object and Data Authorities

These are keywords, each representing predefined combination of object and data authorities. They reduce the time required to assign specific authorities to users.

*ALL

allows the user to perform all authorized operations (object and data) on the object. *CHANGE

provides *OBJOPR authority and all data authority. *USE

provides *OBJOPR authority and data read authority. *EXCLUDE

authority prevents the user from accessing the object even if *PUBLIC is authorized. In addition to these, users can create customized combinations of object and data authorities.

Changing authorities with EDTOBJAUT

We use an example here to illustrate the use of some of the types of authorities discussed above. In this example, we want to allow a certain user to copy a member from the file "SRCFILE" which is stored in the library "YOURLIB". First of all, we need to allow the user to have access to the library "YOURLIB". To do that, we use the "Edit Object Authority", EDTOBJAUT, command to edit the authority on "YOURLIB". (Note that your default library, i.e. the library that has the same name as your user profile, is normally owned by your security officer so you cannot change its authorities). Type EDTOBJAUT on a command line and press <F4>. Fill in the blanks for object, library, and object type (*LIB) and press <Enter> .

Edit Object Authority (EDTOBJAUT) Type choices, press Enter.

Object . . . > YOURLIB Name

Library . . . *LIBL Name, *LIBL, *CURLIB Object type . . . > *LIB *ALRTBL, *AUTL, *CFGL...

To see the detail screen as shown below, press <F11>. Note that the owner of "YOURLIB" has *ALL authority on the object.

Edit Object Authority

Object . . . : YOURLIB Object type . . . . : *LIB Library . . . : QSYS Owner . . . : JOHNDOE

Type changes to current authorities, press Enter.

Object secured by authorization list . . . .: *NONE Object ----Object--- ---Data---

User Authority Opr Mgt Exist Read Add Update Delete JOHNDOE *ALL X X X X X X X *PUBLIC *EXCLUDE _ _ _ _ _ _ _

F3=Exit F5=Refresh F6=Add new users F10=Grant with reference object F11=Nondisplay detail F12=Cancel F17=Top F18=Bottom

Press <F6> to add a user to the list of users authorized to this object. Type in the name of the user and *USE for the object authority. Press <Enter> to return to the previous screen. Notice that *USE gives the user *OBJOPR and *READ authorities on "YOURLIB". (Note: If you want to edit a specific authority, type "X" in the position relating to that authority to grant authority or a space to delete that authority.)

Next, we need to allow the user access to the file "SRCFILE". Use EDTOBJAUT to edit the authority on the file "SRCFILE". Type EDTOBJAUT OBJ(YOURLIB/SRCFILE) OBJTYPE(*FILE) or use the prompt to fill in the parameters. Press <F6> to add the user to the authorization list with *USE authority. This will allow them to do perform various operations on "SRCFILE" including copying members from the file. To allow them to copy the entire file (i.e. "SRCFILE"), *OBJMGT must be granted. To do that, type "X" under "Mgt" in the detail screen for that user. Note that the object authority changes from *USE to USER DEF (meaning a customized authority).

Changing Authorities with GRTOBJAUT and RVKOBJAUT

To use GRTOBJAUT and RVKOBJAUT type the command and prompt <F4>. Fill in the library name, object name, object type along with the user you are granting authorities and the respective authority being granted. At any time press <F1> for more help. Sending and Receiving Network Files

Users can send and receive network files to and from each other. The "Send Network File" (SNDNETF) command can be used to send a member of a physical database file (PF-DTA or PF-SRC) to another user. In the example shown below, the member "SNDMBR" of the physical database file "SNDFILE" (which is contained in the library "SNDLIB") is to be sent to the user "RCV". "MKTAS400" is the address of the AS/400 at Minnesota State University, Mankato. When the network file arrives at its destination, a message is sent to both the sender and receiver.

Send Network File (SNDNETF) Type choices, press Enter.

File . . . > SNDFILE___ Name

Library . . . > SNDLIB____ Name, *LIBL, *CURLIB User ID: _

User ID . . . > RCV_______ Character value Address . . . > MKTAS400__ Character value + for more values _

Member . . . > SNDMBR____ Name, *FIRST Additional Parameters

To file type . . . *FROMFILE_ *FROMFILE, *DATA

VM/MVS class . . . A A, B, C, D, E, F, G, H, I Send priority . . . *NORMAL__ *NORMAL, *HIGH

F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys

The receiver will have to run the "Work with Network Files" (WRKNETF) command to inspect their network files.

Work with Network Files (WRKNETF) User . . . : RCV_______

User ID/Address . . . : RCV_______ MKTAS400 Type options, press Enter.

1=Receive network file 3=Submit job 4=Delete network file 5=Display physical file member

File ---From--- ----Arrival----

Opt File Member Number User ID Address Da te Time __ SNDFILE SNDMBR 1 SENDER MKTAS400 08/26/92 16:37

F3=Exit F4=Prompt F5=Refresh F9=Retrieve F11=Display type/records F12=Cancel

Type 1 in the "Opt" blank in front of the network file to receive and press <F4>to prompt. The following screen will show up.

Receive Network File (RCVNETF) Type choices, press Enter.

From file . . . > 'SNDFILE'__ Character value To data base file . . . *FROMFILE__ Name, *FROMFILE

Documento similar