View previous topic :: View next topic
|
Author |
Message |
sunilnatarajrk
New User
Joined: 11 Oct 2004 Posts: 9
|
|
|
|
Can we use F command code in the root segment? When i use 'F' & 'L' command codes it is fetching the same segment occurance in the root segment. Solution plzzzz |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Yes you can. Probably you have a single root segment in your DB. |
|
Back to top |
|
|
sunilnatarajrk
New User
Joined: 11 Oct 2004 Posts: 9
|
|
|
|
I don't think so. It looks like you can't do a F command code or L command code in the root segments. Its is restricted here. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Well, then, what are you trying to do? If you would kindly explain then we could help. Every situation is unique. Take a look at this topic....
ibmmainframes.com/viewtopic.php?t=26538
If you could tell us what you want to do and give us a look at your DBD (data base definition), then we could help more quickly. |
|
Back to top |
|
|
sunilnatarajrk
New User
Joined: 11 Oct 2004 Posts: 9
|
|
|
|
No Sandy, I am in the process of learning. For the learning purpose, i have created a sample database and inserted lot of records. And i tried using all the command codes to know its efficiency. I have a root segment called "patient" and it has more than 4 occurances. I used a F command code here to retrieve the first occurance with a GN call as well as a GU call. I couldn't retrieve the first occurance. Then i thougt that F command code won't work for the root segment and started trying the L command code to fetch the last occurance.
Both the calls fetches the same records and i surfed in internet to know more about the F & L command codes. And it has been clearly stated that the usage of F and L command codes in the root segment is restricted. For your reference i am giving my DBDSRCE also:-
Code: |
DBD NAME=MEDDBD,ACCESS=HDAM,
RMNAME=(DFSJDC40,010,00000120,00004096)
DATASET DD1=MEDDBD,DEVICE=3390,SIZE=4096
SEGM NAME=PATIENT,PARENT=0,BYTES=35
FIELD NAME=(PNO,SEQ,U),START=1,
BYTES=5,TYPE=C
FIELD NAME=PNAME,START=6,
BYTES=10,TYPE=C
FIELD NAME=PADDR,START=16,
BYTES=10,TYPE=C
FIELD NAME=PMOB,START=26,
BYTES=10,TYPE=C
SEGM NAME=ILLNESS,PARENT=PATIENT,BYTES=20
FIELD NAME=(ILLDATE,SEQ,M),START=1,
BYTES=10,TYPE=C
FIELD NAME=ILLNAME,START=11,
BYTES=10,TYPE=C
SEGM NAME=TRTMENT,PARENT=ILLNESS,BYTES=30 |
|
|
Back to top |
|
|
sunilnatarajrk
New User
Joined: 11 Oct 2004 Posts: 9
|
|
|
|
I have given my DBDSRCE. Can anybody clarify my doubt pleasE? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
In addition to looking around the internet, i'd suggest using the "IBM Manuals" link at the top of the page and from the manuals listed look in the IMS command reference manual. |
|
Back to top |
|
|
mkarthikeyan
New User
Joined: 07 Aug 2008 Posts: 34 Location: Bangalore
|
|
|
|
IMS disregards F when you supply it at the root level or with a GU or GHU. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
A GU (get unique) with no ssa statements will always position you at the beginning a the database. |
|
Back to top |
|
|
mkarthikeyan
New User
Joined: 07 Aug 2008 Posts: 34 Location: Bangalore
|
|
|
|
Sandy,
I cudn't get you? It would be great if you explain your reply that is relevant to the topic? Why do you what to give a GU call that is unqualified? |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Didn't someone ask about getting the first root segment? Command codes in a root ssa only apply to their child segments. |
|
Back to top |
|
|
|