|
|
| Author |
Message |
bhuspin
New User
Joined: 13 Aug 2008 Posts: 27 Location: chennai
|
|
|
|
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 |
|
 |
References
|
|
 |
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 4247 Location: Atlanta, GA
|
|
|
|
| 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 |
|
 |
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 417
|
|
|
|
bhuspin,
I'm curious, is the task you are describing for your job ? |
|
| Back to top |
|
 |
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 80 Location: India
|
|
|
|
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 |
|
 |
bijal.awhad
New User
Joined: 19 Mar 2008 Posts: 44 Location: Bangalore
|
|
|
|
| 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 |
|
 |
Ronald Burr
New User
Joined: 22 Oct 2009 Posts: 67 Location: U.S.A.
|
|
|
|
| None of the code provided shows where/if you move data to the REC-A-DATA field. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 3385 Location: germany
|
|
|
|
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 |
|
 |
|
|