View previous topic :: View next topic
|
Author |
Message |
akshaiya
New User
Joined: 17 Sep 2005 Posts: 49
|
|
|
|
I have a requirement that based on 2 different types in the vsam,i need to display the data in the screen.
VSAM-1 layout (type-1 on 23rd position)
VSAM-2 layout (type-2 on 23rd position)
Code: |
* ******************************************
* CICS OPERATION READ
* ******************************************
EXEC CICS READ
DATASET ( 'CMSVSAMC' )
RIDFLD ( IDGCA-VSAM-KEY )
INTO ( IDGCA )
LENGTH ( IDGCA-LENGTH )
END-EXEC. |
After read,
if it is found that the record is type-1 then I need to put in VSAM-1 Layout
if it is found that the record is type-2 then I need to put in VSAM-2 Layout
can you tell me how do we this in cics. |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
create 2 seperate maps within your mapset and then display the map that is for the correct vsam layout |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Personally, I'd READ SET and once I've determined which type then I'd move (ws) or set address (linkage). |
|
Back to top |
|
|
GlobalGyan
New User
Joined: 31 Jan 2006 Posts: 28
|
|
|
|
I belive you have a variable length file. The length LENGTH ( IDGCA-LENGTH ) usually in this case is the maximum length of a record in the VSAM file. After pushing into the IDGCA field, you can check for the type and then move to the corresponding WS VSAM layouts.
- GG |
|
Back to top |
|
|
|