View previous topic :: View next topic
|
Author |
Message |
rocketz
New User
Joined: 15 Sep 2022 Posts: 4 Location: Unites States
|
|
|
|
Hi,
Can somebody help with this issue, appreciate t all help.
I have some set data in an array that Im writing into a container one by one.
Im writing set of data into the container using PUT CONTAINER with APPEND from the very first PUT.
Code: |
Add +1 to Name-num
EXEC CICS PUT CONTAINER(WS-CONT-NAME)
CHANNEL(WS-CH-NAME)
FROM(NAME-CONTAINER)
RESP(COMMAND-RESP) RESP2(COMMAND-RESP2)
APPEND
END-EXEC
|
Employee Set 1
John
Mark
Matt
When I write the Employee2, it repeats the first set again and then start appends with new data
Employee Set 2
John
Mark
Matt
Pam
Rud
Doug
Expected Output:
Employee Set 2
Pam
Rud
Doug |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
Back to top |
|
|
rocketz
New User
Joined: 15 Sep 2022 Posts: 4 Location: Unites States
|
|
|
|
Thanks did refer the manual, and tried removing Append first time insert and use Append after that, but doesn't seem to be working. Am I missing anything here, please advise. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
If you are wanting the data replaced, why are you specifying APPEND anyway? From the manual:
Quote: |
APPEND
Specifies that the data passed to the container is appended to the existing data in the container. If this option is not stated, the existing data in the container is overwritten by the data passed to the container. |
In other words, the system is doing precisely what it should be doing based upon your command. |
|
Back to top |
|
|
rocketz
New User
Joined: 15 Sep 2022 Posts: 4 Location: Unites States
|
|
|
|
Actually I dont want the data to be append for the 2nd group with 1st group, rather every group should be a fresh insert.
In my example I put JOHN into the container then increment name-num by 1 then put MARK, increment name-num by 1 and then put MATT, increment name-num.
First group works fine
Employee group1{
John
Mark
Matt}
Then, when start writing the 2nd group, I put PAM into the container then increment name-num by 1 then put RUD, increment name-num by 1 and then put DOUG increment name-num. Now name-num is 6, when i look at the result I see system has taken previous array as well, something like below.
System Output:
Employee group2{
John
Mark
Matt
Pam
Rud
Doug}
i want the data to appended within the group but not append the first group data into the 2nd group.
My Expected Output:
Employee group2{
Pam
Rud
Doug}
Not sure if i explained comprehensively, but any idea or help is appreciated whether i should initialize container before group2 put or reset name-num. |
|
Back to top |
|
|
|