Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

iSeries - Find Loop and Branch Conditions start and end line.

License

NotificationsYou must be signed in to change notification settings

cod-e-ash/LoopCond

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is part of myRPG Utils series to help overcome some of the day-to-day activities which can be automated.
During analysis of old rpg or cl codes, we come across sections where its very confusing that which line is part of which if condition or dow loop. This happens moslty when we deal with old rpg codes or some linear code with no indentation. This ustility will help to find the line to start of conditions like (IF, SELECT etc.) and also looping conditions like (DOW, DOU, WHILE, FOR etc.)

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have AS400 Machine access (duh!)
Create a RPGUtils Source File to store the files.

CRTSRCPF RPGUTILS

Program and Object Descriptions

  • IFLBLF
    This is a PF source which will hold output after running the program on any give source code file.

  • IFLBLC
    Driver CL program.

  • IFLBLCMD
    Driver command source file.

  • IFLBLP
    Main program.

Installing

Step 1.Upload all files to AS400 server, use ftp.DO NOT CHANGE THE MODE TO BINARY.

  open pub400.com  username  password  cd /QSYS.LIB  cd YOURLIB.LIB  cd RPGUTILS.FILE  mput *.MBR  disconnect  quit

Step 2.Change the atribute type accordingly once uploaded.

  IFLBLC      CLLE      IFLBLCMD    CMD       IFLBLF      PF        IFLBLP      SQLRPGLE

Step3.Use below command to compile.

CRTPF FILE(YOURLIB/IFLBLF) SRCFILE(YOURLIB/RPGUTILS) SRCMBR(IFLBLF)           CRTSQLRPGI OBJ(YOURLIB/IFLBLP) SRCFILE((YOURLIB/RPGUTILS) SRCMBR(IFLBLP) OBJTYPE(*PGM) REPLACE(*YES)  CRTBNDCL PGM(YOURLIB/IFLBLC) SRCFILE((YOURLIB/RPGUTILS) SRCMBR(IFLBLC) REPLACE(*NO)               CRTCMD CMD(YOURLIB/IFLBL) PGM(*LIBL/IFLBLC) SRCFILE(YOURLIB/RPGUTILS) SRCMBR(IFLBLCMD) REPLACE(*YES)

Running

IFLBL <source member name> <source file> <source library>

E.g.IFLBL SRCMBR(IFLBLP) SRCFIL(RPGUTILS) SRCLIB(YOURLIB)This will output a file IFLBLF. FSTRSEQ is the start line, FEBDSEQ is the end of the sequence.Rest fields will tell you if there are else conditions etc.

SELECT * FROM IFLBLFO/P:FID    FSTRSEQ    FENDSEQ   FIFDATA                                                1      47.00     220.00           DoW SQLCOD = 0;                                2      50.00     216.00             If %SubSt(SRCDTA:7:1) <> '*' And (           3      55.00     140.00               Select;                                    4      69.00      72.00                 If %SubSt(wkStrUpper:26:5) = '  CAS' Or  5     101.00     113.00                 If FElseSq1 = *Zeros;                    6     128.00     130.00                 If wkCasFlg = *On;                       7     146.00     150.00               If %Scan('//':SRCDTA) > 0;                 8     155.10     155.13                 If wkFoundStart <= 0;                    9     155.16     155.22                 If wkFoundStart > 0;

Authors

Ashish Bagaddeo

License

This project is licensed under the Apache License v2.0 - see theLICENSE.md file for details

Acknowledgments

Thankswww.PUB400.com for hosting a public server.

About

iSeries - Find Loop and Branch Conditions start and end line.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp