Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
In CICS how to write a data of a Rec. write into a KSDS file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
bhuspin

New User


Joined: 13 Aug 2008
Posts: 26
Location: chennai

PostPosted: Wed Jan 20, 2010 11:52 am    Post subject: In CICS how to write a data of a Rec. write into a KSDS file
Reply with quote

Hi,

I am new to CICS-COB coding. In CICS maps, i need to accept the input fields from map, I need to move those input from map to a file using CICS-COB program, the Records has both data part as well as key-part. I am able write a Key-part in a KSDS file, but not able to write a data-part into a file. Please help me on this.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8201
Location: Dubuque, Iowa, USA

PostPosted: Wed Jan 20, 2010 4:17 pm    Post subject:
Reply with quote

If you can write a key into a KSDS file, you can write data. Just ensure the group variable that contains the key also has the data area.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Jan 21, 2010 3:09 am    Post subject:
Reply with quote

bhuspin,

I'm curious, is the task you are describing for your job ?
Back to top
View user's profile Send private message
rajesh_mbt

New User


Joined: 27 Mar 2006
Posts: 95
Location: India

PostPosted: Thu Jan 21, 2010 3:36 pm    Post subject:
Reply with quote

Please share the working storage variable declaration for your KSDS file.
We will get some clear picture to help you on this
Back to top
View user's profile Send private message
bijal.awhad

New User


Joined: 19 Mar 2008
Posts: 51
Location: Pune

PostPosted: Sun Jan 24, 2010 2:34 pm    Post subject: Re: In CICS how to write a data of a Rec. write into a KSDS
Reply with quote

bhuspin wrote:
Hi,

I am new to CICS-COB coding. In CICS maps, i need to accept the input fields from map, I need to move those input from map to a file using CICS-COB program, the Records has both data part as well as key-part. I am able write a Key-part in a KSDS file, but not able to write a data-part into a file. Please help me on this.


Hi bhuspin,

Let us start with the WS variables,
Code:

 77    WK-LENGTH                  PIC S9 (4) COMP.
 01    FILE-IOAREA.
        05   REC-A.
               10    REC-A-KEY     PIC X (8).
               10    REC-A-DATA  PIC X (32).


Following is an example of the WRITE command

Code:
 
MOVE 40   TO WK-LENGTH.
MOVE 'KEYVALUE'   TO REC-A-KEY.
EXEC  CICS  WRITE
          DATASET ('FILEXXXX')
          FROM (FILE-IOAREA)
          RIDFLD (REC-A-KEY)
          LENGTH (WK-LENGTH)
END-EXEC.


Execution Result: The record whose key is KEYVALUE will be written into the file FILEXXXX.

Hope this will help.

Regards
Bijal
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Sun Jan 24, 2010 11:15 pm    Post subject:
Reply with quote

None of the code provided shows where/if you move data to the REC-A-DATA field.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Mon Jan 25, 2010 12:34 am    Post subject:
Reply with quote

There are sample programs in the CICS COBOL Sample programs SDFHSAMP.

SDFHSAMP is somewhere on your system.
The link provides an index of program to 'what the example explains'.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us