Giter VIP home page Giter VIP logo

jclparser's Issues

'Then' part of conditional not being written out in parsed output

Here is a diff:

< //DRVRCHKF IF (DRVRCHK.RC ^=0) THEN SEND FAILURE NOTE
---
> //DRVRCHKF IF (DRVRCHK.RC ^=0) THEN
52c52
< //COPY1OK  IF (DRVRCHK.RC = 0) THEN COPY FIRST PACK
---
> //COPY1OK IF (DRVRCHK.RC = 0) THEN
62c62
< //COPY1F   IF (COPY1.RC ^= 0) THEN SEND FAILURE NOTE
---
> //COPY1F IF (COPY1.RC ^= 0) THEN
120c120
< //CTIMEOUT IF (RESUBEX.RC ^=0) THEN SEND FINAL FAILURE NOTE
---
> //CTIMEOUT IF (RESUBEX.RC ^=0) THEN

Comment line in middle of parameters not treated as comment

Run jcl2jcl on https://github.com/MikeFultonDev/JCLParser/blob/main/testsrc/parmcomments.skipjcl with -v and you will see:

000000001 //IBMUSERC JOB 'CRTHFS'     Job Card                                            |
-> JOB Statement
000000002 //STEP1  EXEC PGM=IEFBR14,                                                      |
-> EXEC Statement
--> continued parameter
000000003 //* Comment                                                                     |
000000004 //       PARM='Hello World'                                                     |
//IBMUSERC JOB 'CRTHFS'  Job Card
//STEP1 EXEC PGM=IEFBR14,
Comment
// PARM='Hello World'

The comment is not being properly printed. Note that for this case, the comment is in the tree - here's a screen shot:

image

but note the newline at the start... So the 'printer' in genJCL could likely deal with this (should validate multi-line comments too).

Also: https://github.com/MikeFultonDev/JCLParser/blob/main/testsrc/odd.skipjcl and https://github.com/MikeFultonDev/JCLParser/blob/main/testsrc/commented.skipjcl

the parms in jcl2sh

Mike, good day, a question, the sample in the README.MD:
jcl2sh <//'IBMUSER.TEST.JCL(UPDATE) >./update.sh
It don't send any message and neither create the update.sh ...
could you comment some action to verify the shell?

sintax error on line 707 of scanjcl.c program

The compilation is generating a CCN3046 "sintax error" in line 707 of scanjcl.c program->
KeyValuePair_T* kvp = cur->kvphead;

to eliminate this error, I fixed it adding an->"else {", in line 606 and other->"}" just before the line 743
and then the compilation was ok! and it generates the module jcl2sh in the bin directory ,... but
The problem is at execution time of the jcl2sh to generate the shell, it does not do anything!...

jcl2sh <//'IBMUSER.TEST.JCL(UPDATE) >./update.sh

do you know, what is happening? or an idea or suggestion to fix this situation?
Is it correct the sintax of the execution jcl2sh? is it missing something else?
Thanks a lot for your help!

JCL to script generate

Hi @mikefultonbluemix ,

Please advice to me how to fix and run your source code?

Some info for your reference as below:
step 1: clone source and save my server.
step 2: create 2 folder

JCL2SH_SOURCE: save source code here
JCL2SH: empty
step 2:
cd to the directory (/u/ibmuser/JCL2SH) = /home/JCL2SH_SOURCE
edit setenv.sh to point to the various MVS programs that will be tested, and to specify where your code was copied to
=>export JCL2SH_ROOT=/home/JCL2SH
step 3:
create folder bin into folder /home/JCL2SH_SOURCE
step 4:
sh build.sh
please see result as below error:
[root@cock-01 JCL2SH]# sh build.sh
Build Default Version
gcc: error: unrecognized command line option ‘-Wc,FLAG(I)’
gcc: error: unrecognized command line option ‘-Wc,xplink,gonum,offset,langlvl(extended),list(./)’
gcc: error: unrecognized command line option ‘-Wc,FLAG(I)’
gcc: error: unrecognized command line option ‘-Wc,xplink,gonum,offset,langlvl(extended),list(./)’
gcc: error: unrecognized command line option ‘-Wc,FLAG(I)’
gcc: error: unrecognized command line option ‘-Wc,xplink,gonum,offset,langlvl(extended),list(./)’
gcc: error: unrecognized command line option ‘-Wc,FLAG(I)’
gcc: error: unrecognized command line option ‘-Wc,xplink,gonum,offset,langlvl(extended),list(./)’
gcc: error: unrecognized command line option ‘-Wc,FLAG(I)’
gcc: error: unrecognized command line option ‘-Wc,xplink,gonum,offset,langlvl(extended),list(./)’
gcc: error: jcl2sh.o: No such file or directory
gcc: error: scanjcl.o: No such file or directory
gcc: error: gensh.o: No such file or directory
gcc: error: jclargs.o: No such file or directory
gcc: error: jclmsgs.o: No such file or directory

Please advice to how to run your source and document guilde step by step. Thanks for the support.

Thanks and best regards,
Nho Luong.

@nluong9

Comment at end of conditionals is not retained

205c205
< // ENDIF /*ENDIF FOR THE IF STARTED AT STEPN007*/
---
> //  ENDIF

and

51c51
< //DOIT     ELSE    /*DG 04092012 FOR REQ C243
---
> //DOIT ELSE
56c56
< //DOIT   ENDIF     /*DG 04092012 FOR REQ C243

are two examples

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.