View previous topic :: View next topic |
Author |
Message |
bnm1014 Beginner
Joined: 16 Sep 2004 Posts: 6 Topics: 3
|
Posted: Fri Sep 17, 2004 9:05 am Post subject: C - problem with dynamic allocate |
|
|
There is a C-Subroutine where I do dyn. allocate as:
Code: |
system( "ALLOC DD(FT05F001) NEW DELETE DSORG(PS) RECFM(F B)
"LRECL(80) BLKSIZE(0) UNIT(VIO) BLOCK(80) SPACE(1 5)
"AVGREC(K)" ) )
after that I do:
fopen( "DD:FT05F001", "w" );
If I call that C-Subr by C-Main , all works correctly, but if I call that by
Stored procedure - all crashed..
I replaced "system" to CallTso(...)
static long CallTSO (char *cmd)
{
long flags, cmd_length, return_code, reason_code, abend_code;
flags = 0x00010101;
cmd_length = strlen (cmd);
return_code = reason_code = abend_code = 0;
IKJEFTSR (&flags
,&cmd[0]
,&cmd_length
,&return_code
,&reason_code
,&abend_code);
if (return_code != 0) {
printf ("TSO call failed: %s\nRc: %d\nRe: %d\nAb: %d\n"
,cmd, return_code, reason_code, abend_code);
return 12;
} /* endif */
return 0;
} /* CallTSO */
|
than "ALLOCATE" command seems to succeed, but the dataset is not DD'ed...
May be you know what is the matter?
Thank's in advance. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
bnm1014 Beginner
Joined: 16 Sep 2004 Posts: 6 Topics: 3
|
Posted: Mon Sep 20, 2004 7:46 am Post subject: |
|
|
Excuse me, I'm young mainframe programmer...
Could you tell me how tso environment is usually established?
Thank's in advance. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
|
|