ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Problem reading config file from CHADEXIT on zOS

Post new topic  Reply to topic
 Problem reading config file from CHADEXIT on zOS « View previous topic :: View next topic » 
Author Message
queuemanager
PostPosted: Thu Dec 16, 2010 5:55 am    Post subject: Problem reading config file from CHADEXIT on zOS Reply with quote

Apprentice

Joined: 28 Nov 2006
Posts: 43
Location: Bangalore

Hi All,

I'm porting a autodefinition exit to zOS for populating attributes of CLUSSDR after fetching the values from a member present in PDSE. Recfm for PDSE is FB. Now, from all the research I know that I have to use fread() to read from a record base PDSE. But, fread statement doesn't return anything in the buffer. Can someone help in letting me know if I'm doing something wrong?

Code :

if ((cfgFile=fopen(temp,"r,recfm=FB") == NULL )) {
return CFG_NO_FILE;
}

loopcount=0;
while ( !feof(cfgFile) && loopcount < 15) {
memset(line,0x00,80);
loopcount++;
count = fread( line, 1, 80, cfgFile);
trimStr(line);
TRACE TPRINTF(("%s \nCOUNT =%d NAME=%s\n ",count,line));
/* Ignore if blank line or comment */
if (line[0] == '\0' || line[0] == '#') {
continue;
}
....
....
....
}

Any help is greatly appreciated.

Thanks & Regards
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Dec 16, 2010 6:19 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Moved to Mainframe forum.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Dec 16, 2010 6:39 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

what is the content of "temp" ? is it a dd name? did you put proper jcl in your stc?
_________________
Regards, Butcher


Last edited by Mr Butcher on Thu Dec 16, 2010 6:45 am; edited 1 time in total
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Dec 16, 2010 6:42 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Any relevant errors or informational messages in the SYSLOG for the CHIN or qmgr?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
queuemanager
PostPosted: Thu Dec 16, 2010 7:07 am    Post subject: Reply with quote

Apprentice

Joined: 28 Nov 2006
Posts: 43
Location: Bangalore

Yes, temp has the value for the DSN having the config member and it is successfully getting accessed. (If I remove the member channels end with config file missing statement).

there no relevant messages in CHIN or MSTR as the channel starts after trying to fecht data from config member 15 times(loopcount) if I don't use loopcount it goes in an infinite loop.

Thanks & Regards
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Dec 16, 2010 11:34 pm    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

blockip2 is a channel exit written in c running on z/os too. it is also able to read a configuration file. maybe you can have a look at its source code how it is done there.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
queuemanager
PostPosted: Fri Dec 17, 2010 12:55 am    Post subject: Reply with quote

Apprentice

Joined: 28 Nov 2006
Posts: 43
Location: Bangalore

Any idea what kind of dataset is used to store configfile in BlockIP2?
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Fri Dec 17, 2010 1:20 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

i use a pds member
_________________
Regards, Butcher
Back to top
View user's profile Send private message
queuemanager
PostPosted: Fri Dec 17, 2010 2:02 am    Post subject: Reply with quote

Apprentice

Joined: 28 Nov 2006
Posts: 43
Location: Bangalore

I'm sorry for troubling you more, but can you send me settings for your PDS member. Something like :

General Data
Management class . . : MCTLIB
Storage class . . . : SCTLIB
Volume serial . . . : TLBG14
Device type . . . . : 3390
Data class . . . . . : DCEXCPTN
Organization . . . : PO
Record format . . . : FB
Record length . . . : 80
Block size . . . . : 23440
1st extent cylinders: 1
Secondary cylinders : 5
Data set name type : PDS

Thanks in advance.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Fri Dec 17, 2010 2:37 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

Code:

General Data                          Current Allocation                   
 Management class . . : X50Y           Allocated cylinders : 6             
 Storage class  . . . : X50Y           Allocated extents . : 5             
  Volume serial . . . : X50Y02         Maximum dir. blocks : 32           
  Device type . . . . : 3390                                               
 Data class . . . . . : **None**                                           
  Organization  . . . : PO            Current Utilization                 
  Record format . . . : FB             Used cylinders  . . : 6             
  Record length . . . : 80             Used extents  . . . : 5             
  Block size  . . . . : 27920          Used dir. blocks  . : 26           
  1st extent cylinders: 2              Number of members . : 250           
  Secondary cylinders : 1                                                 
  Data set name type  : PDS       

_________________
Regards, Butcher
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Problem reading config file from CHADEXIT on zOS
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.