IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Cics vsam - different layouts


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
akshaiya

New User


Joined: 17 Sep 2005
Posts: 49

PostPosted: Thu Mar 22, 2007 1:04 am
Reply with quote

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
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Thu Mar 22, 2007 1:32 am
Reply with quote

create 2 seperate maps within your mapset and then display the map that is for the correct vsam layout
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Mar 22, 2007 1:40 am
Reply with quote

Personally, I'd READ SET and once I've determined which type then I'd move (ws) or set address (linkage).
Back to top
View user's profile Send private message
GlobalGyan

New User


Joined: 31 Jan 2006
Posts: 28

PostPosted: Thu Mar 22, 2007 10:03 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top