Thanks for the suggestion.
Test code that has:
unix.ReadDirent(2,buff)
generates: undefined: unix.ReadDirent
In lpp/IBM/cvg/v1r17/go/src/cmd/vendor/
golang.org/x/sys/unixI find readdirent_getdents.go which looks like a valid implementation of ReadDirent in package unix; BUT, it does not have a zos build tag.
In lpp/IBM/cvg/v1r17/go/src/cmd/vendor/
golang.org/x/sys/unix I cannot see a zos/s390x version of Getdents (used by ReadDirent).
Where do I find and how do I use a zos/s390x version of ReadDirent?
------------------------------
Mike Baldwin
President
Cartagena Software Limited
Markham ON
1-905-887-0755
------------------------------
Original Message:
Sent: Tue June 21, 2022 08:17 AM
From: Philippe Leite
Subject: How to handle syscall functions on a port to z/OS
Try to use package golang.org/x/sys/unix.
------------------------------
Philippe Bernardino Leite
Original Message:
Sent: Mon June 20, 2022 12:13 PM
From: Mike Baldwin
Subject: How to handle syscall functions on a port to z/OS
How to handle syscall functions on a port to z/OS?
Sample code:
package main
import "fmt"
import "syscall"
func main() {
buff := ݨbyte{0}
fmt.Println("trying syscall on z/os")
syscall.ReadDirent(2,buff)
}
This builds, but on execution generates: syscall.ReadDirent: not implemented on z/OS
------------------------------
Mike Baldwin
President
Cartagena Software Limited
Markham ON
1-905-887-0755
------------------------------