Discussion:
[hercules-os380] DSD
kerravon86@yahoo.com.au [hercules-os380]
2018-06-15 13:01:22 UTC
Permalink
Hi Plonta.

I've just downloaded your DSD product and
it's clear that you have done a lot of work.
Thanks for your contribution.

I have some comments.

There is no author's name or copyright status.

The readme.txt says:

fopen()
The PDPCLIB documentation states that files can be opened
fopen("SYS1.MACLIB", "r"); but this isn't the case.
Datasets must be either defined in JCL, or dynamically allocated
fopen can only take a DD name fopen("DD000001", "r");
For PDSs fopen("DD000001(MEMBER)", "r");


I don't know what is happening there. First
of all, PDPCLIB 3.10 has support for
dynamic allocation. You can see the code
in stdio.c, like this:

/* The SVC 99 interface on MVS requires an uppercase
filename in order to be found via a catalog search */
while (*p != '\0')
{
*p = toupper((unsigned char)*p);
p++;
}
/* create a DD from the handle number */
sprintf(tmpdd, "PDP%03dHD", spareSpot);
fdclr(tmpdd); /* unconditionally clear */
filedef(tmpdd, newfnm, mode);


Secondly, the syntax you gave will not actually
work for DDNAMEs. You need to have "dd:"
in front of the ddname, otherwise you get an
error like this:

//HEXDUMP JOB CLASS=C,REGION=0K
//*
//* Do a hex dump of a dataset
//*
//HEXDUMP EXEC PGM=HEXDUMP,PARM='IN'
//SYSIN DD DUMMY
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//IN DD DSN=SYS1.MACLIB,DISP=SHR
//*
//

unable to open file IN for input


I used your example of SYS1.MACLIB and ran
"hexdump" on it. Hexdump is a C program. Here
is what I got:

//HEXDUMP JOB CLASS=C,REGION=0K
//*
//* Do a hex dump of a dataset
//*
//HEXDUMP EXEC PGM=HEXDUMP,PARM='SYS1.MACLIB'
//SYSIN DD DUMMY
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//*
//

000000 00FEC1C2 C5D5C440 404000B6 03023211 ..ABEND ......
000010 1225C1C3 C2404040 40400170 03029019 ..ACB ......
000020 2441C1C3 C2E5E240 40400171 01029031 ..ACBVS ......
000030 2441C1C4 C2404040 404002DD 0900C1C4 ..ADB ....AD
...


Can you run hexdump on your system? Note
that SYS1.MACLIB is a PDS, so it opens the
directory in that situation, not a member. If
you run it on a member, you get:

//HEXDUMP JOB CLASS=C,REGION=0K
//*
//* Do a hex dump of a dataset
//*
//HEXDUMP EXEC PGM=HEXDUMP,PARM='SYS1.MACLIB(READ)'
//SYSIN DD DUMMY
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//*
//

000000 5C40615C 40D4C1C3 C3D6D4D7 40E860F2 * /* MACCOMP Y-2
000010 40E2C3F1 C4F061E2 D1C4F4F8 40404040 SC1D0/SJD48
000020 40404040 40404040 40404040 40404040
000030 40404040 40404040 40404040 40404040
000040 40404040 405C6140 F0F0F0F1 F0F0F0F3 */ 00010003
000050 5C40615C 40D4C1C3 E2E3C1E3 40E860F2 * /* MACSTAT Y-2
000060 40F7F3F0 F7F861F0 F2F1F1F6 F0404040 73078/021160
000070 40404040 40404040 40404040 40404040
000080 40404040 40404040 40404040 40404040
000090 40404040 405C6140 F0F0F0F1 F2F0F0F3 */ 00012003
0000A0 40404040 40404040 40D4C1C3 D9D64040 MACRO
0000B0 40404040 40404040 40404040 40404040
0000C0 40404040 40404040 40404040 40404040
0000D0 40404040 40404040 40404040 40404040
0000E0 40404040 40404040 F0F0F0F2 F0F0F0F0 00020000
0000F0 50D5C1D4 C5404040 40D9C5C1 C4404050 &NAME READ &
000100 C4C5C3C2 6B50E3E8 D7C56B50 C4C3C26B DECB,&TYPE,&DCB,
...


BFN. Paul.

Loading...