Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
GDG base creation using Java

From Java z/OS, using zfile I can create a mainframe dataset. Both flat file and GDG versions.

If the GDG base does not exist the java code abends. Do we have an option to create the mainframe GDG base dataset from Java?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

GDG base entries are created via the IDCAMS DEFINE GENERATIONDATAGROUP command.

There is a section in the documentation on invoking IDCAMS from within your program, but it seems to presume the invoking program is Assembler.

In my experience, job step failure due to a GDG base being undefined is not something recovered from programmatically. Implementation plans include define all required GDG base entries.

over 4 years ago · Santiago Trujillo Report

0

Given below is the code snippet i used to create the GDG Base from java. We just add the IDCAMS SYSIN input to a string and execute the AccessMethodServices with that input. getoutputlines will give you the sysout from the IDCAMS command.

AccessMethodServices ams = new AccessMethodServices();

String gdgCreateString = "DEFINE GDG(NAME( " + dsName + " )  LIMIT(15)  NOEMPTY  SCRATCH)  " ;

ams.addInputLine(gdgCreateString );

int rc = ams.execute();

System.out.println(ams.getOutputLines());
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!