Author |
Message
|
queuemanager |
Posted: Thu Dec 16, 2010 5:55 am Post subject: Problem reading config file from CHADEXIT on zOS |
|
|
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 |
|
 |
bruce2359 |
Posted: Thu Dec 16, 2010 6:19 am Post subject: |
|
|
 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 |
|
 |
Mr Butcher |
Posted: Thu Dec 16, 2010 6:39 am Post subject: |
|
|
 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 |
|
 |
bruce2359 |
Posted: Thu Dec 16, 2010 6:42 am Post subject: |
|
|
 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 |
|
 |
queuemanager |
Posted: Thu Dec 16, 2010 7:07 am Post subject: |
|
|
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 |
|
 |
Mr Butcher |
Posted: Thu Dec 16, 2010 11:34 pm Post subject: |
|
|
 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 |
|
 |
queuemanager |
Posted: Fri Dec 17, 2010 12:55 am Post subject: |
|
|
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 |
|
 |
Mr Butcher |
Posted: Fri Dec 17, 2010 1:20 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
i use a pds member _________________ Regards, Butcher |
|
Back to top |
|
 |
queuemanager |
Posted: Fri Dec 17, 2010 2:02 am Post subject: |
|
|
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 |
|
 |
Mr Butcher |
Posted: Fri Dec 17, 2010 2:37 am Post subject: |
|
|
 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 |
|
 |
|