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
 

 

Need to create an SSA with mulitple conditions.

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

New User


Joined: 15 Jan 2007
Posts: 36
Location: Kerala

PostPosted: Thu Jul 17, 2008 5:42 pm    Post subject: Need to create an SSA with mulitple conditions.
Reply with quote

I need to create an SSA in for a DB, say proration db.
For the proration db - hierarchy is SPRPPR01(root) ----SPRPPR10(child)

1. The key field for SPRPPR01 is PBILL. The search field is DATE.

2. I need to create an SSA for SPRPPR01 with multiple conditions.

3. The condition is it should retrieve all the records between a date range. For example, it should retrieve the occurences for sprppr01 with date greater than 062208 and less than 071408. How can i create an SSA for this.

Currently the one i have created is giving AK status code.

I will give you the current ssa which is in error. Please tell me how should i modify it to make it correct.?

01 WS-SPRBSSAS.
03 WS-SSA-SPRPPR01.
05 SGN-SPRPPR01 VALUE 'SPRPPR01'
PIC X(8).
05 CCA-SPRPPR01 VALUE '*'
PIC X(1).
05 CCF-SPRPPR01 VALUE '-'
PIC X(1).
05 CCL-SPRPPR01 VALUE '-'
PIC X(1).
05 CCD-SPRPPR01 VALUE '-'
PIC X(1).
05 CCN-SPRPPR01 VALUE '-'
PIC X(1).
05 CCC-SPRPPR01 VALUE '-'
PIC X(1).
05 CCU-SPRPPR01 VALUE '-'
PIC X(1).
05 CCV-SPRPPR01 VALUE '-'
PIC X(1).
05 CCP-SPRPPR01 VALUE '-'
PIC X(1).
05 BQ-SPRPPR01 VALUE '('
PIC X(1).
05 FLN-SPRPPR01-BILLDATE
VALUE 'BILLDATE'
PIC X(8).
05 RO-SPRPPR01-BILLDATE VALUE '>='
PIC XX.
05 VALUE-SPRPPR01-BILLDATE
PIC 9(09).
05 EQ-SPRPPR01-BILLDATE VALUE '&'
PIC XX.
05 BO-SPRPPR01 REDEFINES EQ-SPRPPR01-BILLDATE
PIC X.
05 FLN-SPRPPR01-BILLDATE1
VALUE 'BILLDATE'
PIC X(8).
05 RO-SPRPPR01-BILLDATE1 VALUE '<='
PIC XX.
05 VALUE-SPRPPR01-BILLDATE1
PIC 9(09).
05 EQ-SPRPPR01-BILLDATE1 VALUE ')'
PIC XX.

Currently this is giving AK - SSA ERROR status code?Please help.
Back to top
View user's profile Send private message

Sandy Zimmer

Active Member


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

PostPosted: Thu Jul 17, 2008 11:45 pm    Post subject:
Reply with quote

WOW - do you know how to put together a boolean SSA? Can we see the dbd for the key fields? You are probably getting the AK status code because you have defined the key field in your SSA incorrectly.
Back to top
View user's profile Send private message
bijoybabu83

New User


Joined: 15 Jan 2007
Posts: 36
Location: Kerala

PostPosted: Thu Jul 17, 2008 11:55 pm    Post subject: Reply to: Need to create an SSA with mulitple conditions.
Reply with quote

Actually I am not using any key field in the ssa. I am using the search field only. Search field is BILLDATE. if you want to see the dbd..here it is ...
DBD NAME=SPRB0000,
ACCESS=(HDAM,OSAM),
RMNAME=(DFSHDC40,9,3150)
DSG001 DATASET DD1=SPRD0001,
DEVICE=3390,
SIZE=8192,
SCAN=0
SEGM NAME=SPRPPR01,
PARENT=0,
BYTES=100,
PTR=(T)
FIELD NAME=(PR01KEY,SEQ,U),
TYPE=C,
BYTES=07,
START=1
FIELD NAME=BILLDATE,
TYPE=C,
BYTES=06,
START=8
------- continued
So you are saying that the issue may be due to BILLDATE X(06) in dbd not matching with BILLDATE 9(09) COMP-3. right..???

Regarding BOOLEAN SSA - I have some idea of BOOLEAN ssa- if i correct the definition to BILLDATE x(06) in SSA --- Can you tell me how to code the boolean ssa to get the dates within the range I have specified.

I have some idea of BOOLEAN ssa.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Fri Jul 18, 2008 12:43 am    Post subject:
Reply with quote

Try adding the key field to your boolean ssa immediately preceding your search field. In the first part of your boolean ssa initialize the 7 byte key value to low-values and make the operator >. In the second part of your boolean - load the ssa key value with high values and make the operator <.

For initial testing of your boolean ssa, init the billdate in the first part of your boolean to low values and high values in the second part. Run thru just a handful of segments and see what you get.

If this works - then we are almost there. Then we will deal with the date.
Back to top
View user's profile Send private message
bijoybabu83

New User


Joined: 15 Jan 2007
Posts: 36
Location: Kerala

PostPosted: Fri Jul 18, 2008 1:02 am    Post subject:
Reply with quote

Sorry. I am confused about what you have said.

Actually my aim is to read the segment sequentially using get next call and the segment needs to be retrieved only if the 'BILLDATE' comes in a particular range. Otherwise I don't want the retrieved segment. So I need an SSA which does not use the key field(PBILL) but only the search field(billdate).

Hope you got the requirement. I am a little confused. Can you look from the requirement point of view. It would be really helpful. And thanks for your time. icon_smile.gif
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Fri Jul 18, 2008 1:42 am    Post subject:
Reply with quote

I know.....there are different ways that you can do this. Behind the scenes, IMS is looking at every segment. Unless you do an unqualified SSA, you need to define the key field in the SSA. Another way to approach it would be to do an unqualifed SSA and then interrogate the value of the BILLDATE.
Back to top
View user's profile Send private message
bijoybabu83

New User


Joined: 15 Jan 2007
Posts: 36
Location: Kerala

PostPosted: Fri Jul 18, 2008 1:52 am    Post subject:
Reply with quote

So Sandy, u are asking me to first create an SSA like
GETNEXT SPRPPR01*(PBILL>highvalues & PBILL<LOWVALUES) and tr y running the program and if this works then we can try with the dates. Aren't you?

Please correct me if i am wrong.
Back to top
View user's profile Send private message
bijoybabu83

New User


Joined: 15 Jan 2007
Posts: 36
Location: Kerala

PostPosted: Fri Jul 18, 2008 1:54 am    Post subject:
Reply with quote

sorry ssa must be

GN SPRPPR01*(PBILL>HIGHVALUES & PBILL < LOW VALUES & DATE > LOW VALUES & DATE < LOW VALUES)

isn't this the one you are asking me to do.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Fri Jul 18, 2008 2:03 am    Post subject:
Reply with quote

GN SPRPPR01*(PBILL>lowVALUES date >lowvalues & PBILL<highVALUES date <highVALUES)

There is nothing lower than low values and nothing higher than high values.

Let's just get the SSA coded with all the fields - test it with low and high values for just a few segments - then we can adjust it.
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 Jul 21, 2008 4:53 pm    Post subject:
Reply with quote

One more thing - what makes you think that billdate is a search field?
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
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Need to create file with Dynamic Name... kapil27 JCL & VSAM 4 Wed May 25, 2016 9:45 am
No new posts How to create/edit/update a new GDG V... karthikbalakumar8 JCL & VSAM 2 Fri Feb 05, 2016 6:35 pm
No new posts DFSORT report with multiple conditions Bill Woodger DFSORT/ICETOOL 9 Wed Jan 20, 2016 2:19 am


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