Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can same PSB be used by multiple programs simultaneously ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
infotech58

New User


Joined: 07 Jul 2005
Posts: 31
Location: Mumbai, INDIA

PostPosted: Mon Nov 12, 2007 4:41 pm    Post subject: Can same PSB be used by multiple programs simultaneously ?
Reply with quote

I have a IMS-DB2 BMP program. This program reads an input file and does some processing (extracting values from database and some calculations) and prepares an output file, where one input record --> one or more output records. As many times the input file contains approx. 50-60 lac records and job runs for 12 hrs. or so.
I want to split the input file into four and run four jobs in parallel. My question is if I can use the same PSB for all four jobs, Would it cause any problem if the same PSB is used simultaneously by different programs ? Any inputs would be appreciated .

Also at one place in the program I am issuing a GNP call (unqualified) to a seg. to find a particular kind of record (which normally is found in last 10% of records); is there any way to start reading the seg. from last record backwards. I think it will save much processing time. I remember using Get Previous in IDMS but I have less idea about IMS.
Back to top
View user's profile Send private message

Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Mon Nov 12, 2007 4:50 pm    Post subject:
Reply with quote

You can use the PSB without any problem.
In IMS, you can't move back, as you did in IDMS.
You can goto last segment using a command code, but u can't goto the previous segment from there.
Please correct me, if I am wrong.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Mon Nov 12, 2007 6:26 pm    Post subject:
Reply with quote

IMS works from left to right. You cannot go backwards. You may not have a problem with the PSB, but I am hoping that it is strictly read only? You may have contention problems with the online system. Are the databases ever offline - perhaps at nite?

You can do your GN call and then reposition yourself back where you were with a GU call - you will need to save the concatenated key value which you will find in they key feedback area in your PCB.

Why are you splitting your processing into 4 jobs? It always helps to know the WHY of your request. I am looking at your requirement and wondering WHY your job runs for so long. What exactly is your process?
Back to top
View user's profile Send private message
infotech58

New User


Joined: 07 Jul 2005
Posts: 31
Location: Mumbai, INDIA

PostPosted: Mon Nov 12, 2007 6:43 pm    Post subject:
Reply with quote

Sandy,

The PSB is read only.
databases are always online.


Following is the Unit of work for Program being repeated for each input record. The job is taking much time simply because of no. of input records and may alse be because of GNP call as mentioned below.
I want to split the process in four and run in parallel only because it would complete in less time compared to a single job; making program efficient and saving CPU time is secondary requiremnt.


Read Input Record
-Read a DB2 table to know VAR1
-IF (COND1)
-IF (COND2)
-GU call for SEG1
-If GU call for SEG1 is not successful, change VAR1 and GU again
-ELSE
-GU SEG2
-GNP SEG3 until REC is found with specified criteria (read from i/p file)
-ELSE
-Read Value of VAR2 from a VSAM file
Write VAR2 in output file
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Mon Nov 12, 2007 6:55 pm    Post subject:
Reply with quote

I think I am seeing a problem - is SEG1 a root? What is the structure of your databases segments - who belongs to who?

Is SEG2 a child of SEG1? Is SEG3 a child of SEG2 or SEG1? When you check your status codes are you checking for anything other than blanks or "GE"?
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 13, 2007 1:05 am    Post subject:
Reply with quote

Sandy, I this SEG1 is a root and SEG2 is a dependent, SEG3 seems to be the child of SEG2. There might, if my assumption is right, indeed be a problem when the GU on SEG2 is unqualified for SEG1. If SEG2 is a dependent of SEG1 the GU will result in a total hierarchycal search (like a qualified GN not on the root). We need the DBD and the DLI-calls in order to investigate further.

If the GU on the SEG2 (if it is a dependent) has to take place a secondaty index on SEG2 might solve the problem.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Nov 13, 2007 2:42 am    Post subject:
Reply with quote

George, now we know part of the problem.

So....SEG1 root key is?
SEG2 child - of seg1 (multiple child segments) key is?
SEG3 child - of seg2 (multiple child segments) key is?

Where are you infotech58? We do need to know what you are trying to do so we can help further. Are you getting the key to SEG1 from the input file? What are you getting from your DB2 database - what is VAR1?

What are the condition tests? What are you trying to do? If you share this info with us, we can help!
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 13, 2007 3:53 am    Post subject:
Reply with quote

Quote:
George, now we know part of the problem.


Sandy, just an assumpion from his requirement. As I read it this just looks like the structure. Let's wait for his explanation.
Back to top
View user's profile Send private message
infotech58

New User


Joined: 07 Jul 2005
Posts: 31
Location: Mumbai, INDIA

PostPosted: Tue Nov 13, 2007 12:28 pm    Post subject:
Reply with quote

Guys, here are the details.

SEG1 -> is being used for lookup purpose. It contains the details of OFFICE, OFFICE ID, LOCATION, etc. We get key for this seg. from input file and fetch other values from SEG1 to be written into output file. If key is not found in SEG1 then we use some default keys and fetch the records from SEG1. SEG1 is not related to SEG2 and SEG3.



SEG3 is child of SEG2. SEG contains the information about CUstomers, Key is CUST No which we are getting form Input File. SEG3 is child of SEG2 and contains all the FIN TRANS made by that CUST. we are setting the position in SEG2 and then issuing a GNP call on SEG3 till the time we get a record with particular transaction code.
Back to top
View user's profile Send private message
infotech58

New User


Joined: 07 Jul 2005
Posts: 31
Location: Mumbai, INDIA

PostPosted: Tue Nov 13, 2007 12:32 pm    Post subject:
Reply with quote

Guys,

some more .. this is a unit of work in simpler terms ..

a record is read from input file. (includes customer id and office name)
office details are fetched from SEG1.
transaction details are fetched from SEG3 for a particular transaction code.
a record is written to output file.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 13, 2007 3:02 pm    Post subject:
Reply with quote

What is the rootsegment and how does the structure look? The DBD would help.
Back to top
View user's profile Send private message
infotech58

New User


Joined: 07 Jul 2005
Posts: 31
Location: Mumbai, INDIA

PostPosted: Tue Nov 13, 2007 5:56 pm    Post subject:
Reply with quote

SEG2 is the root SEG.

SEG2 --> SEG3.

SEG1 is a standalone SEG.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Nov 13, 2007 7:12 pm    Post subject:
Reply with quote

You still have not given us enough information. We need the PURPOSE and logic to be able to help. Why are you retrieving SEG1? What if you do not retrieve it? What is the key to SEG2? Do you want all children of SEG2 and what are you looking for on SEG3?

So....SEG1 root key is? What if you get a "GE" on your qualified call?

SEG2 root - key is? Where do you get the key?
SEG3 child - of seg2 (multiple child segments) key is? What are you looking for?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us