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
 
Invoking IDCAMS from COBOL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
pushpagiri

New User


Joined: 07 Jul 2005
Posts: 51

PostPosted: Fri Jul 22, 2005 12:42 pm    Post subject: Invoking IDCAMS from COBOL?
Reply with quote

Hi,

How can I invoke IDCAMS from a COBOL
Program?

I want to insert a record into a KSDS file,
whicih i couldnt do with COBOL.
But this is possible with IDCAMS in JCL.
So I want to invoke IDCAMS from COBOL program.

Please anybody guide me if you know.
Back to top
View user's profile Send private message

rssomm

New User


Joined: 05 Jun 2005
Posts: 41
Location: Hyderabad

PostPosted: Fri Jul 22, 2005 12:47 pm    Post subject:
Reply with quote

Hi Pushpagiri,

What do you mean by insering a record in to KSDS? How can you do it using IDCAMS?

Thank U.
Madhu
Back to top
View user's profile Send private message
pushpagiri

New User


Joined: 07 Jul 2005
Posts: 51

PostPosted: Fri Jul 22, 2005 12:54 pm    Post subject:
Reply with quote

hi madhu,

Please refer this topic for your query
And guide me if you know the answer...

http://ibmmainframes.com/viewtopic.php?t=4454
Back to top
View user's profile Send private message
rssomm

New User


Joined: 05 Jun 2005
Posts: 41
Location: Hyderabad

PostPosted: Fri Jul 22, 2005 1:03 pm    Post subject:
Reply with quote

Hi,

I don't think any problems will araise when you add record '3 eeee' as per your example.

Anyhow let me try once this. Inform u later.

Thank U.
Madhu
Back to top
View user's profile Send private message
pushpagiri

New User


Joined: 07 Jul 2005
Posts: 51

PostPosted: Fri Jul 22, 2005 1:13 pm    Post subject:
Reply with quote

hi Madhu,

A correction in your reply.I am not trying to add a record.
I am inserting a record(into KSDS).

If your try comes success please send me the
code.

thank you
Back to top
View user's profile Send private message
rssomm

New User


Joined: 05 Jun 2005
Posts: 41
Location: Hyderabad

PostPosted: Fri Jul 22, 2005 1:22 pm    Post subject:
Reply with quote

Hi,

There is nothing like INSERT in VSAM. If we write the record, VSAM will take care of every thing. The recoreds may or maynot be in sequential order physically.

Thank U
Madhu
Back to top
View user's profile Send private message
pushpagiri

New User


Joined: 07 Jul 2005
Posts: 51

PostPosted: Fri Jul 22, 2005 1:36 pm    Post subject:
Reply with quote

pushpagiri wrote:

http://ibmmainframes.com/viewtopic.php?t=4454



Hi Madhu,

This is my file spec:

VSAM : KSDS
1 aaaa
2 dddd
4 ffff

record key is (1 0)

Now I have "record out of sequence" error if
I try to insert(write-as you mean) "3 cccc" through COBOL
program.
You are mistaking in VSAM.It is KSDS not ESDS as you are
thining currently.

ps read the topic once again which i have quoted.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jul 23, 2005 10:26 pm    Post subject:
Reply with quote

Push,

Adding a rec to a VSAM file is trivial, but there can be a variety of reasons for why you're having trouble. Since you don't provide the pertinent code (select stmt, FD, open, R/W stmts), jcl, and IDCAMS data it's difficult to guess at the reason for the problem.

BTW, did you allocate freespace? And please confine your request to ONE thread.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Issue in suppressing leading zeros &a... Vijay_Sirisha COBOL Programming 21 Thu Jun 07, 2018 8:01 pm
No new posts Invoking adrdssu using attchmvs harisukumaran IBM Tools 5 Tue Jun 05, 2018 3:30 am
No new posts VBS to VB in COBOL and JCL srajendran2 COBOL Programming 12 Fri Jun 01, 2018 3:04 am
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts How to convert 2 bytes into single by... pkmurali DB2 6 Fri May 25, 2018 1:41 pm

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