View previous topic :: View next topic
|
Author |
Message |
arunspanickar
New User
Joined: 12 Sep 2009 Posts: 7 Location: India
|
|
|
|
Hi,
I have a problem when I try to update IMS segments using REPL. I am testing a new program to update an IMS segement.The REPL call is returning status code SPACE but the database is not reflecting the changes.
I could verify the segment name, processing option in REPL call using DISPLAY statements. The PROC OPTION for the call is A.
Below are my codes for GHU and REPL for the segment FINVIN
CALL 'CBLTDLI' USING GHU
VFIN-PCB
FINVIN
SSA-SPFINVIN
IF VFINA030-STATUS-CODE = SPACE
NEXT SENTENCE
ELSE
……
CALL 'CBLTDLI' USING REPL
VFIN-PCB
FINVIN.
IF VFINA030-STATUS-CODE = SPACE
PERFORM Z9995-CKPT-INCREMENT THRU Z9995-EXIT
ADD 1 TO RECS-READ
DISPLAY ' REPL STATUS ' VFINA030-STATUS-CODE
DISPLAY ' PROC OPTION' VFINA030-PROC-OPTS
DISPLAY ' SEG NAME' VFINA030-SEG-NAME-FB
ELSE
……….
For the unit testing, I am using an existing PSB for my new program.Will this be an issue?
Can anyone kindly suggest me a possible solution? Thanks a lot. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
IF VFINA030-STATUS-CODE = SPACE
NEXT SENTENCE
ELSE
Can you post what you have after the else? |
|
Back to top |
|
|
arunspanickar
New User
Joined: 12 Sep 2009 Posts: 7 Location: India
|
|
|
|
Thanks for the reply.
I am pasting the GHU call here
CALL 'CBLTDLI' USING GHU
VFIN-PCB
FINVIN
SSA-SPFINVIN
IF VFINA030-STATUS-CODE = SPACE
NEXT SENTENCE
ELSE
IF VFINA030-STATUS-CODE = 'GE'
NEXT SENTENCE
ELSE
MOVE VFINA030-PCB TO PCB-AREA
MOVE '1100-GHU-AAAAR'
TO HA-ABEND-CALLING-PARAGPH
MOVE 'ABEND ON GHU TO VFINA030 SEG'
TO HA-ABEND-REASON
PERFORM 99999-DISPLAY-IMS-ABEND. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Tell me I am wrong, but it looks like when you get the "GE", you continue on to the REPL logic? Are you performing a paragraph thru an exit? |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
I want to post this that I learned way back WHEN. Use paragraphs with relevant exit - always perform thru an exit. It is much easier to maintain. For instance -
CALL 'CBLTDLI' USING GHU
VFIN-PCB
FINVIN
SSA-SPFINVIN
IF VFINA030-STATUS-CODE = SPACE
NEXT SENTENCE
ELSE
IF VFINA030-STATUS-CODE = 'GE'
(this code is just an example)
MOVE VFINA030-PCB TO PCB-AREA
MOVE '1100-GHU-AAAAR'
TO HA-ABEND-CALLING-PARAGPH
MOVE 'ABEND ON GHU TO VFINA030 SEG'
TO HA-ABEND-REASON
PERFORM 99999-DISPLAY-IMS-ABEND
go to 1199-exit
ELSE
MOVE VFINA030-PCB TO PCB-AREA
MOVE '1100-GHU-AAAAR'
TO HA-ABEND-CALLING-PARAGPH
MOVE 'ABEND ON GHU TO VFINA030 SEG'
TO HA-ABEND-REASON
PERFORM 99999-DISPLAY-IMS-ABEND
go to 1199-exit. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Another thing - why aren't you using your very own PSB? I am adamant about every program having it's very own PSB. What if the OWNER of the PSB you are using decides to add or taking away a PCB within that PSB? Also, when you use a non-relevant PSB, you need to make sure that the PSB you are using aligns with your LINKAGE and ENTRY statements. So, if the PSB you are using happens to have 20 PCBs, then you need ALL of them in your process even if you are only using 1. So, check it out. |
|
Back to top |
|
|
arunspanickar
New User
Joined: 12 Sep 2009 Posts: 7 Location: India
|
|
|
|
Hi Sandy,
I am using the existing PSB for my unit testing. There will be seperate PSB for my program in later stage. Actually the current PSB that U am using has a n additional PCB ( for GSAM operation on a sequentiol file). That extra PCB is not included in ENTRy statement , and sequential file is not added to test JCL also. As you mentioned I will make entries in linkage and ENTRY statements for 3rd PCB and do the unit testing.
Thanks alot for your sugestion.
Arun |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Why not just do your own PSB? Hopefully you will be testing with your own PSB before installing this procedure into production. Also, it sounds like the PSB that you borrowed is BMP - is your process BMP? |
|
Back to top |
|
|
arunspanickar
New User
Joined: 12 Sep 2009 Posts: 7 Location: India
|
|
|
|
Yes it is BMP processing.
I have started testing with an existing PSB since the new PSB creation is taking time. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Why is the new PSB taking time? Can't you do it yourself? Or, you code it and your systems support group gens it?
So, if you need to use the existing PSB, take a look at the program that corresponds - look at the linkage and entry statements in that program. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
One more thing - try displaying the contents of your key-feedback-area both after your get and then right after your replace. |
|
Back to top |
|
|
arunspanickar
New User
Joined: 12 Sep 2009 Posts: 7 Location: India
|
|
|
|
Hi,
Today i have tested one existing BMP program and the IMS segment is not getting updated.I have verified the REPL call's status codes and also veriifed the values I moved to IMS segment. Evrything looks good. The Processing option of PSB is A.
Is there any standard settings i am missing before I compile and test new/ existing programs in test region?Or is it related to accessibilty of my id ?
I am pretty new to IMS. Sorry If i am asking very basic question.
Thanks again for your time.
Arun |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Did you display the contents of - all of the fields in your PCB area both after your get and after your replace? Make sure to display ALL of
Did you change your linkage and entry?
Did you change your code? Can we see both the get and the repl logic?
I'm sorry for asking all of this again. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
You are going after the root segment, aren't you? |
|
Back to top |
|
|
arunspanickar
New User
Joined: 12 Sep 2009 Posts: 7 Location: India
|
|
|
|
I am changing the root segment |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Is it working now? |
|
Back to top |
|
|
arunspanickar
New User
Joined: 12 Sep 2009 Posts: 7 Location: India
|
|
|
|
Still I am facing problem with update. I have displayed IO area just before REPL call and it was giving me the correct values.
I am pasting the PSB defnition
SPFINVIN PCB TYPE=DB,DBDNAME=VFINA030,KEYLEN=17,PROCOPT=A
SENSEG NAME=SPFINVIN,PARENT=0
PCB TYPE=GSAM,DBDNAME=VTSFZ010,PROCOPT=G
PCB TYPE=GSAM,DBDNAME=VTSFZ020,PROCOPT=L
PCB TYPE=GSAM,DBDNAME=VTSFZ030,PROCOPT=L
PSBGEN LANG=COBOL,PSBNAME=VDANB400,CMPAT=YES
END
Here SPFINVIN update is not happening in my program. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Can you post your linkage and entry? Also, your JCL? Are you displaying the contents of the PCB for SPFINVIN? |
|
Back to top |
|
|
|