Skip to content

Commit

Permalink
JT400: Use better name of workspace in the readme.adoc (apache#5928)
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriOndrusek committed Apr 22, 2024
1 parent 35c7d75 commit 1f33bc0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions integration-tests/jt400/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ Execution of mocked tests can be skipped by setting property `skip-mock-tests` t

Several objects (queues, user spaces, ..) have to be created in the external server to make testing successful.

The suggested approach is to create a test library. In the following text, the test library's name is `REDHAT5`
The suggested approach is to create a test library. In the following text, the test library's name is `LIBRARY`

Download i-access client solutions from this https://www.ibm.com/support/pages/ibm-i-access-client-solutions[page].
Use the 5250 emulator option from the client and run the following command for library creation:

```
CRTLIB REDHAT5
CRTLIB LIBRARY
```

==== Program call testing
Expand All @@ -49,13 +49,13 @@ Program call test reads the content of user space.
CALL QCMD

//creation of PROGCALL user space
CALL PGM(QSYS/QUSCRTUS) PARM(('PROGCALL REDHAT5 ' (*CHAR 20))
CALL PGM(QSYS/QUSCRTUS) PARM(('PROGCALL LIBRARY ' (*CHAR 20))
('TEST ' (*CHAR 10)) (16 (*INT 4))
(' ' (*CHAR 1)) ('*ALL ' (*CHAR 10))
(' ' (*CHAR 16)))

//value is set to hello camel
CALL PGM(QSYS/QUSCHGUS) PARM(('PROGCALL REDHAT5 ' (*CHAR 20))
CALL PGM(QSYS/QUSCHGUS) PARM(('PROGCALL LIBRARY ' (*CHAR 20))
(1 (*INT 4)) (16 (*INT 4))
('hello camel ' (*CHAR 16))
('1' (*CHAR 1)) )
Expand All @@ -66,7 +66,7 @@ CALL PGM(QSYS/QUSCHGUS) PARM(('PROGCALL REDHAT5 ' (*CHAR 20))
Message queue can be created by following the command

```
CRTMSGQ REDHAT5/TESTMSGQ
CRTMSGQ LIBRARY/TESTMSGQ
```


Expand All @@ -82,18 +82,18 @@ Two data-queues are required for the testing. One created as `keyed=true` and on

```
//keyed data queue
CRTDTAQ DTAQ(REDHAT5/TESTKEYED) SEQ(*KEYED) KEYLEN(20) MAXLEN(100)
CRTDTAQ DTAQ(LIBRARY/TESTKEYED) SEQ(*KEYED) KEYLEN(20) MAXLEN(100)

//LIFO data queue
CRTDTAQ DTAQ(REDHAT5/TESTLIFO) SEQ(*LIFO) MAXLEN(100)
CRTDTAQ DTAQ(LIBRARY/TESTLIFO) SEQ(*LIFO) MAXLEN(100)
```

==== Using different object names

If your test object names are different from the default ones, you can override default values via environmental variable

```
export JT400_LIBRARY=#library_if_not_REDHA5
export JT400_LIBRARY=#library_if_not_LIBRARY
export JT400_LIFO_QUEUE=#lifoqueue_if_not_TESTLIFO.DTAQ
export JT400_KEYED_QUEUE=#lkeyedqueue_if_not_TESTKEYED.DTAQ
export JT400_MESSAGE_QUEUE=#messagequeue_if_not_TESTMSGQ.MSGQ
Expand All @@ -104,7 +104,7 @@ export JT400_USER_SPACE=#userspace_if_not_PROGCALL
or for Windows:

```
$Env:JT400_LIBRARY = "#library_if_not_REDHA5"
$Env:JT400_LIBRARY = "#library_if_not_LIBRARY"
$Env:JT400_LIFO_QUEUE="#lifoqueue_if_not_TESTLIFO.DTAQe"
$Env:JT400_KEYED_QUEUE="#lkeyedqueue_if_not_TESTKEYED.DTAQ"
$Env:JT400_MESSAGE_QUEUE="#messagequeue_if_not_TESTMSGQ.MSGQ"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cq.jt400.username=${JT400_USERNAME:username}
cq.jt400.password=${JT400_PASSWORD:password}

#jt400 custom objects for testing
cq.jt400.library=${JT400_LIBRARY:REDHAT5}
cq.jt400.library=${JT400_LIBRARY:LIBRARY}
cq.jt400.user-space=${JT400_USER_SPACE:PROGCALL}
cq.jt400.message-queue=${JT400_MESSAGE_QUEUE:TESTMSGQ.MSGQ}
cq.jt400.message-replyto-queue=${JT400_MESSAGE_REPLYTO_QUEUE:REPLYMSGQ.MSGQ}
Expand Down

0 comments on commit 1f33bc0

Please sign in to comment.