Skip to content

L3 Workshop - CREASTMT - Batch Job - Failing in the very first step - { "exitCode": -1, "stepName": "DELDEF01", "program": "IDCAMS", "status": "Error" }

0

Hi,

I am executing CREASTMT.groovy script as per the instructions given in L3 workshop which is as follows:

  1. EXECUTE CREASTMT Job from http://localhost:8080/gapwalk-application/script/CREASTMT

When executing the job, I am getting as error: { "exitCode": -1, "stepName": "DELDEF01", "program": "IDCAMS", "status": "Error" }

I went back to console to see what exactly the error was and it looks little confusing. Please find the error as given below:

line 1:409 extraneous input 'DATA' expecting {ERASE, 'NAME', VOLUMES, NOT_DOCUMENTED_VOLUME, NOREUSE, REUSE, INDEXED, NONINDEXED, NUMBERED, LINEAR, 'SHAREOPTIONS', KEYS, RECORDSIZE, FREESPACE, CONTROLINTERVALSIZE, CYLINDERS, RECOVERY, 'SPEED', 'SUBAL', 'SHR', TRACKS, 'RECORDS', ORDERED, UNORDERED, 'IMBED', 'NOIMBED', 'REPLICATE', 'NOREPLICATE', 'KEYRANGES', BUFFERSPACE, UNIQUE, 'FILE', ')'}******


c.n.b.g.r.job.support.GroovyJobExecutor : Failure cause :

java.lang.RuntimeException: org.antlr.v4.runtime.misc.ParseCancellationException: line 1:409 extraneous input 'DATA' expecting {ERASE, 'NAME', VOLUMES, NOT_DOCUMENTED_VOLUME, NOREUSE, REUSE, INDEXED, NONINDEXED, NUMBERED, LINEAR, 'SHAREOPTIONS', KEYS, RECORDSIZE, FREESPACE, CONTROLINTERVALSIZE, CYLINDERS, RECOVERY, 'SPEED', 'SUBAL', 'SHR', TRACKS, 'RECORDS', ORDERED, UNORDERED, 'IMBED', 'NOIMBED', 'REPLICATE', 'NOREPLICATE', 'KEYRANGES', BUFFERSPACE, UNIQUE, 'FILE', ')'}

This is confusing because in earlier chapters we were asked to delete few of above mentioned attributes when defining the cluster. I even copied the exact same code from the L3 workshop and tried executing it but it still failed with the same error. The groovy script is as follows:

def stepDELDEF01(Object shell, Map params, Map programResults){ shell.with { if (checkValidProgramResults(programResults)) { return execStep("DELDEF01", "IDCAMS", programResults, { mpr .withFileConfigurations(new FileConfigurationUtils() .withJobContext(jobContext) .systemOut("SYSPRINT") .output("*") .build() .fileSystem("SYSIN") .stream( """ DELETE AWS.M2.CARDDEMO.TRXFL.SEQ DELETE AWS.M2.CARDDEMO.TRXFL.VSAM.KSDS - CLUSTER SET MAXCC = 0 DEFINE CLUSTER (NAME(AWS.M2.CARDDEMO.TRXFL.VSAM.KSDS) - KEYS(32 0) - RECORDSIZE(350 350) - INDEXED) - DATA (NAME(AWS.M2.CARDDEMO.TRXFL.DATA)) - INDEX (NAME(AWS.M2.CARDDEMO.TRXFL.INDEX))""", getEncoding()) .build() .getFileConfigurations()) .withParameters(params) .runProgram("IDCAMS") }) } } }

Not sure what is going wrong here. Could anyone help me out here.

Thanks.

asked a year ago200 views
1 Answer
2

The error you're encountering in the CREASTMT job is likely due to an issue with the IDCAMS command syntax in your groovy script. The error message suggests that there's an unexpected 'DATA' keyword in the DEFINE CLUSTER command.

This problem is often caused by incorrect spacing or line breaks in the IDCAMS commands. In Blu Age, whitespace interpretation can be sensitive, leading to syntax errors.

To resolve this issue, try modifying your DEFINE CLUSTER command by removing all extra spaces and ensuring each clause is on a single line. Here's a corrected version of the DEFINE CLUSTER command:

DEFINE CLUSTER (NAME(AWS.M2.CARDDEMO.TRXFL.VSAM.KSDS) -
KEYS(32 0) -
RECORDSIZE(350 350) -
INDEXED) -
DATA (NAME(AWS.M2.CARDDEMO.TRXFL.DATA)) -
INDEX (NAME(AWS.M2.CARDDEMO.TRXFL.INDEX))

Make sure there are no extra spaces at the beginning of each line and that each line ends with a hyphen (-) except for the last line. This should help the IDCAMS parser interpret the command correctly.

If the issue persists after making these changes, you may need to review the entire IDCAMS command set in your script for any other syntax errors or unexpected characters. Also, ensure that the encoding of your script file matches the expected encoding in your Blu Age environment.
Sources
Error when executing the CREASTMT job in CardDemo Blu Age modernized application | AWS re:Post

answered a year ago
EXPERT
reviewed a year ago
  • Hi...Made changes to remove whitespaces to groovy statement and it worked as expected.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.