Documentation ¶
Index ¶
- func Apf(args ApfArgs) (string, int, error)
- func ApfOptString(o ApfOpt) string
- func BlockInFile(dataset string, args *BlockInFileArgs) error
- func CancelJob(jobId string, args *CancelJobArgs) error
- func Compare(source string, target string, args *CompareArgs) (*string, error)
- func Copy(source string, target string, args *CopyArgs) error
- func Delete(datasets ...string) (bool, error)
- func DeleteMember(pattern string) (bool, error)
- func Execute(pgm string, pgmArgs *string, dds []DDStatement, args *Args) (string, int)
- func ExecuteAuthorized(pgm string, pgmArgs *string, dds []DDStatement, args *Args) (string, int)
- func ExecuteOperCmd()
- func Exist(dataset string) (bool, error)
- func FindLinkList(member string) (string, error)
- func FindMember(member string, concatentation string) (string, error)
- func FindParmLib(member string) (string, error)
- func FindProcLib(member string) (string, error)
- func FindReplace(dataset string, find string, replace string) error
- func Hlq() (string, error)
- func LineInFile(dataset string, line string, args *LineInFileArgs) error
- func ListLinkList() ([]string, error)
- func ListMembers(pattern string) ([]string, error)
- func ListParmList() ([]string, error)
- func ListProcLib() ([]string, error)
- func Move(source string, target string) error
- func MoveMember(dataset string, source string, target string) error
- func ParseLine(line string) []string
- func Read(dataset string, args *ReadArgs) (string, error)
- func ReadConsole(options *rune) (string, error)
- func ReadHead(dataset string, Nlines *uint) (string, error)
- func ReadJobOutput(jobId string, stepname string, dataset string, args *ReadJobOutputArgs) (string, error)
- func Search(dataset string, value string, args *SearchArgs) (*string, error)
- func SearchParamLib(find string) (string, error)
- func SearchProcLib(find string) (string, error)
- func String(v string) *string
- func TmpName(hlq *string) (string, error)
- func Uint(v uint) *uint
- func UnZip(file string, hlq string, args *UnZipArgs) error
- func Write(dataset string, content string, _append bool) error
- func Zip(file string, target string, args *ZipArgs) error
- type ApfArgs
- type ApfOpt
- type ApfOptData
- type ApfPersistent
- type Args
- type BlockInFileArgs
- type CancelJobArgs
- type CompareArgs
- type CopyArgs
- type CreateArgs
- type DDStatement
- type DataDefinition
- type Dataset
- type DatasetDefinition
- type DsType
- type FileDefinition
- type Job
- type JobDDs
- type JobDDsArgs
- type KeyPoint
- type LineInFileArgs
- type ListingArgs
- type Point
- type RcFormat
- type ReadArgs
- type ReadJobOutputArgs
- type SearchArgs
- type SubmitArgs
- type UnZipArgs
- type ValueDefinition
- type ZipArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApfOptString ¶
func BlockInFile ¶
func BlockInFile(dataset string, args *BlockInFileArgs) error
ZOAU dmod function to be used by zos_blockinfile Ansible module
func CancelJob ¶
func CancelJob(jobId string, args *CancelJobArgs) error
func Compare ¶
func Compare(source string, target string, args *CompareArgs) (*string, error)
Compare two datasets, output the ISRSUPC output.
func Delete ¶
Delete a z/OS dataset. Return false if dataset specified by dataset pattern does not exist. Otherwise task completed without error.
func DeleteMember ¶
Delete members contained in a dataset. Return false if dataset specified by dataset pattern does not exist. Otherwise task completed without error.
func ExecuteAuthorized ¶
Execute an authorized MVS Program. Returns the stdout or the stderr and the return code
func ExecuteOperCmd ¶
func ExecuteOperCmd()
func FindLinkList ¶
func FindMember ¶
Find dataset that contains member within a concatenation. Returns the first dataset that contains member. Return the dataset containing the member.
func FindParmLib ¶
func FindProcLib ¶
func FindReplace ¶
Replace text within a dataset.
func LineInFile ¶
func LineInFile(dataset string, line string, args *LineInFileArgs) error
ZOAU dsed function to be used by zos_lineinfile Ansible module.
func ListLinkList ¶
func ListMembers ¶
Get a list of members from a dataset.
func ListParmList ¶
func ListProcLib ¶
func MoveMember ¶
Move (rename) a member.
func ReadConsole ¶
func ReadHead ¶
A function to display the head content of a non-VSAM dataset. Gets the head content of a dataset. Nlines: Read the first nlines lines from the dataset.
func ReadJobOutput ¶
func Search ¶
func Search(dataset string, value string, args *SearchArgs) (*string, error)
Search a dataset using ISRSUPC.
func SearchParamLib ¶
func SearchProcLib ¶
Types ¶
type ApfArgs ¶
type ApfArgs struct { Opt *ApfOpt DsName *string Volumen *string Sms bool ForceDynamic bool Persistent *ApfPersistent Batch []ApfOptData }
type ApfOptData ¶
type ApfPersistent ¶
type BlockInFileArgs ¶
type BlockInFileArgs struct { // The line(s) to insert inside the marker lines separated by '\\n'. (e.g. "line 1\\nline 2\\nline 3") Block *string // The marker line template in this format <marker_begin>\\n<marker_end>\\n< {mark} marker> // The template should be 3 sections separated by '\\n'. (e.g "OPEN\\nCLOSE\\n# {mark} IBM BLOCK") // "{mark}" should be included in the < {mark} marker> (default="# {mark} MANAGED BLOCK") section // and will be replaced with <marker_begin> (default="BEGIN") and <marker_end> (default="END"). // The two marker lines will be surrounding the lines that are going to be inserted. // Marker lines can only be used once. If marker lines already exist in the target dataset or HFS file, // they will be removed with the surrounded lines before new block get inserted Market *string // Insert block after matching regex pattern // The special value "EOF" will insert the block at the end of the target dataset or HFS file InsAft *string // Insert block before matching regex pattern // The special value "BOF" will insert the block at the beginning of the target dataset or HFS file. InsBef *string // Encoding of the dataset Encoding *string // Defaults to True. // - state=True -> Insert or replace block // - state=False -> Remove block State *bool // Obtain exclusive lock for the dataset. Lock bool // Force open. Open dataset member in DISP=SHR mode. Default is DISP=OLD mode when False. Force bool }
type CancelJobArgs ¶
type CompareArgs ¶
type CopyArgs ¶
type CopyArgs struct { // If the source data set has aliases, they will be recreated in the target data set. Alias bool // This should be set if the source data set is an executable. Executable bool Binary bool TextMode bool // Forces the copy. IMPORTANT: Use of this option can lead to permanent loss of the original target information. Force bool }
type CreateArgs ¶
type CreateArgs struct { // Type of dataset (also known as dsorg). Type *DsType // Space to allocate for the dataset. Defaults to 5M PrimarySpace *string // Secondary (extent) space to allocate for the dataset. // Defaults to 1/10 of primary space. SecondarySpace *string // Directory blocks for PDS-type datasets. Default is 5. DirectoryBlocks *uint // Block size of dataset. // Default varies on record format: FBA=32718, FB=32720, VBA=32743, VB/U=32760 BlockSize *uint // Record format of dataset. // FB (default), F, FBA, FBS, U, VB, VBA, VBS RecordFormat *RcFormat // Logical record length, expressed in bytes // - Defaults vary on format. F/FB/FBS=80, FBA=133, VB/VBA/VBS=137, U=0. // - For variable datasets, the length must include the 4-byte prefix area. RecordLength *uint // The storage class for an SMS-managed dataset. // - Required for SMS-managed datasets that do not match an SMS-rule. // - Not valid for datasets that are not SMS-managed. // - Note that all non-linear VSAM datasets are SMS-managed. StorageClassName *string // Data class name for dataset. DataClassName *string // The management class for an SMS-managed dataset. // - Optional for SMS-managed datasets that do not match an SMS-rule. // - Not valid for datasets that are not SMS-managed. // - Note that all non-linear VSAM datasets are SMS-managed. ManagementClassName *string // Required for KSDS datasets Keys *KeyPoint // Comma separated list of volume serials. Offline volumes are not considered. Volumes *string }
type DDStatement ¶
type DDStatement struct { Name string Definition DataDefinition }
type DataDefinition ¶
type DataDefinition interface {
// contains filtered or unexported methods
}
type Dataset ¶
type Dataset struct { // Name of the dataset. Name string // Record format of the dataset. LastReferenced string // Dataset organization of the dataset. Dsorg string // Record format of the dataset. Recfm string // Record length of the dataset. Lrecl int // Block size of the dataset. BlockSize int // Volume the dataset resides on. Volume string // Estimated used space of the dataset. nil if unknown. UsedSpace *int // Estimated total space of the dataset. TotalSpace int }
Struct that represents the z/OS dataset.
func ListingDataset ¶
func ListingDataset(pattern string, args *ListingArgs) ([]Dataset, error)
Returns a listing of the datasets matching the supplied pattern.
func ParseListingValues ¶
type DatasetDefinition ¶
type DatasetDefinition struct { DatasetName string Disposition *string Type *string Primary *uint PrimaryUnit *string Secondary *uint SecondaryUnit *string NormalDisposition *string AbnormalDisposition *string ConditionalDisposition *string BlockSize *string RecordFormat *string RecordLength *string StorageClass *string DataClass *string ManagementClass *string KeyLength *string KeyOffset *string Volumes *string DatasetKeyLabel *string KeyLabel1 *string KeyEncoding1 *string KeyLabel2 *string KeyEncoding2 *string }
type FileDefinition ¶
type FileDefinition struct { // Full path to the HFS file PathName string NormalDisposition *string AbnormalDisposition *string PathMode *string StatusGroup *string FileData *string RecordLength *string BlockSize *string RecordFormat *string }
Definition of an HFS file
type JobDDs ¶
type JobDDs struct { StepName string Dataset string ProcStep *string Format string Length string RecNum string }
func ListJobDDs ¶
func ListJobDDs(jobId string, args *JobDDsArgs) ([]JobDDs, error)
type JobDDsArgs ¶
type LineInFileArgs ¶
type LineInFileArgs struct { // The regular expression to look for in every line of the dataset or HFS file. // - For state = True, the pattern to replace if found. Only the last line found will be replaced. // - For state = False, the pattern of the line(s) to remove. // - If the regular expression is not matched, the line will be added to the dataset or HFS file in keeping with ins_aft or ins_bef settings. Regex *string // Insert line after matching regex pattern. // - The special value “EOF” will insert the line at the end of the target dataset or HFS file. // - If regex is provided, ins_aft is only honored if no match for regex is found. // - ins_bef will be ignored if provided. InsAft *string // Insert line before matching regex pattern // - The special value “BOF” will insert the line at the beginning of the target dataset or HFS file. // - If regex is provided, ins_bef is only honored if no match for regex is found. // - ins_bef will be ignored if ins_aft is provided. InsBef *string // Encoding of the dataset. Encoding *string // Defaults to True. // - state=True -> Insert or replace block // - state=False -> Remove block State *bool // If set, ins_aft and ins_bef will work with the first line that matches the given regular expression. FirstMatch bool // Obtain exclusive lock for the dataset. Lock bool // Force open. Open dataset member in DISP=SHR mode. Default is DISP=OLD mode when False. Force bool }
type ListingArgs ¶
type ReadJobOutputArgs ¶
type SearchArgs ¶
type SearchArgs struct { // Print only a count of matched lines in the dataset. CountLines bool // Display the line number for each match. DisplayLines bool // Ignore case for search. IgnoreCase bool // Print names of datasets being searched. PrintDatasets bool // Number of lines to be shown before and after each match. Lines *uint }
type SubmitArgs ¶
type UnZipArgs ¶
type UnZipArgs struct { // Src is a dataset Dataset bool // Overwrite existing data sets with the same name on target device Overwrite bool // Specifies the SMS classes specified with -S and/or -m should be used when creating temporary datasets. SmsForTmp bool // Unzip volume (default is dataset). Volume *string // specify how large to allocate datasets. Valid units are: CYL, TRK, K, M, G. Defaults to bytes if no unit provided. Size *string // Include particular data set patterns from dzip binary in unzipped contents. Include *string // Exclude particular data set patterns from dzip binary in unzipped contents. Exclude *string // specifies the user-desired storage class that is to replace the source storage class as input to the ACS routines. StorageClassName *string // specifies the user-desired management class that is to replace the source management class as input to the ACS routines. ManagementClassName *string // specifies a particular volume should be used when creating temporary datasets DestVolume *string // SrcVolume *string }
type ValueDefinition ¶
type ValueDefinition struct {
V string
}
type ZipArgs ¶
type ZipArgs struct { // Dump to data set instead of file. Dataset bool // Overwrite file or dataset destination if it already exists. Overwrite bool // Specifies potentially recoverable errors should be tolerated. Force bool // Dump a volume instead of datasets. // If a volume is provided along with dataset information and -V is // not specified, dzip will look for provided data set patterns on the // provided volume. Volume *string // Specify how large to allocate datasets. Valid units are: CYL, TRK, K, M, G. Defaults to bytes if no unit provided. Size *string // Exclude pattern for data sets, this option is ignored if dumping a volume. Exclude *string // Specifies the user-desired storage class is to be used when creating temporary and target datasets. StorageClassName *string // Specifies the user-desired management class that is to be used when creating temporary and target datasets. ManagementClassName *string // Specifies a particular volume should be used when creating temporary and target datasets. DestVolume *string SrcVolume *string }