GithubHelp home page GithubHelp logo

uwol / proleap-cobol Goto Github PK

View Code? Open in Web Editor NEW
15.0 7.0 3.0 4.89 MB

ProLeap COBOL • Analyze, Execute & Transform COBOL

License: GNU Affero General Public License v3.0

Java 91.58% COBOL 8.42%
cobol cobol85 proleap antlr4 interpreter transformer transcompiler transpiler

proleap-cobol's People

Contributors

uwol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

proleap-cobol's Issues

How to run converted File.

Hi team thank you so much your cobol to java transformer is so helpful now can you help me that how can i run the converted file. do i have to add you package is yes can you help me with the step.
if no then how can i execute me java file?

thank you again !!!!!!

How to get substring index (from, to) from cobol file

How to get substring index (from, to) from cobol file
Exa.

WORKING-STORAGE SECTION.  
01 ALP-NUM PIC X(10) VALUE 'ABC123'. 
LINKAGE SECTION.
PROCEDURE DIVISION.
MAIN.
    MOVE ALP-NUM(1:3) TO ALP-NUM. <-- how to get index (1:3)

please suggest me

Transformer for MULTIPLY works the wrong way round

Hello!

I am new to Cobol, but according to Cobol examples and specifications I found, printMultiplyRegular() in MultiplyStatementRule contains a bug. It treats the first operand as the result and "MULTIPLY 42 BY B" is transformed into "BigDecimal.valueOf(42) = BigDecimal.valueOf(42).multiply(b);", which makes no sense (especially when the first argument is a literal).

This replacement will fix it:

package io.proleap.cobol.transform.java.rules.lang.procedure.multiply;

// ...

public class MultiplyStatementRule extends CobolTransformRule<MultiplyStatementContext, MultiplyStatement> {

	// ...

	protected void printMultiplyRegular(MultiplyStatement multiplyStatement, RuleContext rc) {
		ByPhrase regular = multiplyStatement.getByPhrase();

		for (ByOperand regularOperand : regular.getByOperands()) {
			rc.visit(regularOperand.getOperandCall().getCtx());
			rc.p(" = ");
			rc.visit(regularOperand.getOperandCall().getCtx());
			rc.p(".multiply(");
			rc.visit(multiplyStatement.getOperandValueStmt().getCtx());
			rc.p(");");
			rc.pNl(regular);
		}
	}
}

Missing artifact io.github.uwol:proleap-cobol-parser:jar:4.0.0

Hi,
Before I begin with my issue , I would like to mention that I am fairly new to the Java space.
I've been following the steps you provided to simulate the Cobol to Java functionality similar to https://www.proleap.io/.
When I clone this project, I get the Missing artifact io.github.uwol:proleap-cobol-parser:jar:4.0.0 in the in all packages except 'proleap-cobol-api'. Also the test cases for the proleap-cobol-parser fail when I try to clean install.

If there is any document you could provide detailing the steps I could follow to achieve my objective would greatly help.

401 Unauthorized

When I try to do $ mvn clean install, I got the following.

401 Unauthorized
{"errors":[{"code":"UNAUTHORIZED","message":"You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication"}]}

CompilationUnit.getProgramUnit()" is null

ProLeap Exception.pdf

I have downloaded and configured both the ProLeap COBOL Parser and ProLeap COBOL projects. I have also added the Windows ENVT variables for SMTP mail. I've been testing the jetty endpoints and I am having issues with the /v1/cobol/analyze/text endpoint.

My json request looks like:

{
    "code": "d:/temp/example.cbl",
    "format": "FIXED"
}

The output I receive is:

Cannot invoke "io.proleap.cobol.asg.metamodel.ProgramUnit.getProcedureDivision()" because the return value of "io.proleap.cobol.asg.metamodel.CompilationUnit.getProgramUnit()" is null

PDF of email received is attached.

The program, located at: d:/temp/example.cbl is:

000100 Identification Division.
000200 Program-ID. 
000300  HELLOWORLD.
000400 Procedure Division.
000500  DISPLAY 'a' UPON CONSOLE.
000600  STOP RUN.

I use postman to submit my requests. Before issuing a request to the analyze endpoint I first issue an /up request followed by a /cron/warmup request.

What am I doing wrong?

Note: I had previously changed:
/proleap-cobol-parser/src/main/java/io/proleap/cobol/preprocessor/CobolPreprocessor.java

NEWLINE constant changed to System.lineSeparator()

	//PB final static String NEWLINE = "\n";
	final static String NEWLINE = System.lineSeparator();

Paul

Java executable gives the following error while trying to hit endpoints for transformation, analyze etc.

io.micronaut.context.exceptions.NoSuchBeanException: No bean of type [io.proleap.cobol.service.transform.cobol.CobolTextTransformService] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.