Help finding jobs

 23 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
We had an ex employee who created numerous custom jobs in lawson. (more knowledge than I have in lawson). One program she created was a token called ZZ412 I pull it up and its just a screen to run a job. I can go into LID and pull up this job and the few parameters I can find in jobdef, but is there somewhere in lawson or LID i can go into to actually see what this job is doing or where this job is actually created, what fields it is using etc. Also, is there a way I can see all custom jobs we have available that I maybe dont know about ...is there like a way to get a list???
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
I meant to say, is there a way to get a list where I can see any custom tokens she may have created. ZZ412, ZB401 etc etc
Greg Moeller
Veteran Member Send Private Message
Posts: 1498
Veteran Member
In LID, you can get a list of all jobs- rngdbdump -ct gen job or to get a list of tokens you could do something like rngdbdump -ct gen jobstep --- there is a token field in that table. If you had access to gen via Crystal reports, you can even write a report.
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
Thanks...I actually did a rngdbdump -c gen program > program.csv so I got a list in CSV....still didnt find what I am looking for. Here is the thing. The old employee created a program that she would run that looks like it has created a folder called "medicarepay" in our lawdir\prod\work directory . I am trying to figure out what token/program creates the file inside this "medicare" pay folder.
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Ronnie, Greg is right on about how to get the tokens. Unfortunately, there isn't an easy way to identify "custom" items specifically. One "best practice" for custom development in Lawson is to start custom program tokens with with characters that would typically not be used by Lawson - we use "ZZ","ZX","ZJ","XX", etc. Since the program you mention is ZZ412, it sounds like they used a similar practice. That makes it easier to identify the custom programs. In this case, I wonder if it may be a modified copy of AC412 "Activity Status Report"? Using LID, you can use the "pgmdef" utility to view the programs. You'll have to dig through the system codes to find the program you are looking for, but you can usually make a good guess based on what it does - is it Finance? HR? Benefits? Activities? Once you find the program in pgmdef, you can F6-Define>>B-Source to get to the objects that make up the program: - "Procedure Description" is the program "Code" - "Working Storage" is the variable and array definition - "Form" is the parameter screen (for reports) or online UI form - "Report Form" is the report layout etc Alternately, if you have direct server access you can browse to LAWDIR/{prodline}/{syscode} and look for the files that start with ZZ412. ZZ412PD is the Procedure Description (Code), ZZ412WS is the Working Storage (variables/arrays), ZZ412.scr is the form layout (parameter screen), and ZZ412.rpt is the report layout. Fortunately COBOL code is fairly human-readable. Good luck to you.
Kelly Meade
J. R. Simplot Company
Boise, ID
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Ronnie - I guess I was typing at the same time you were. You may want to try "rngdbdump -ct gen jobstepwrk|grep -i medicarepay". This should list jobs that create/update that folder which would give you a place to start.
Kelly Meade
J. R. Simplot Company
Boise, ID
Greg Moeller
Veteran Member Send Private Message
Posts: 1498
Veteran Member
Thanks, Kelly. You'll also likely be able to tell where that file is coming from by doing the rngdbdump on jobstep. It has a FilePathName field in it.
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
Ok thanks...let me try these. I will report back.
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
sorry for being silly, but where does it put the dump file? Like in the one I ran mentioned above, I can find it easily because i named it program.csv In the example of rngdbdump -ct gen jobstepwrk|grep -i medicarepay, where would I find the output?
Greg Moeller
Veteran Member Send Private Message
Posts: 1498
Veteran Member
The command line rngdbdump will only output to the screen.. unless you tack on a '> filename.csv' to the end of it. -eg [code]rngdbdump -ct gen jobstepwrk|grep -i medicarepay > find_file.csv [/code]
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
(facepalm)....yeah I should have thought about that...lol
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
oh...that must be why I wasnt seeing anything returned, because the CSV file is blank as well. : /
Greg Moeller
Veteran Member Send Private Message
Posts: 1498
Veteran Member
Try the same command with the jobstep table instead of jobstepwrk - see if that finds you anything.
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
thats odd...I ran another one on our "PREMIERPAY" folder which is similar and I know uses our program ZZ411, and the output to the CSV or screen was also blank for it.
Greg Moeller
Veteran Member Send Private Message
Posts: 1498
Veteran Member
Try again using WORKFILE1 and/or WORKFILE2 tables.
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
Posted By Greg Moeller on 11/15/2013 09:55 AM Try the same command with the jobstep table instead of jobstepwrk - see if that finds you anything.
did that...just took "wrk" off the command...it did run much longer, but then I look at the output, and it returns nothing.
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
thanks workfile1 actually returned some data. It spit back"PROD PR ZZ412 MEDPAY OUT 6 MEDICAREPAY" So it looks like it maybe is using ZZ412 afterall.
Woozy
Veteran Member Send Private Message
Posts: 709
Veteran Member
Ahh - there you go. So, now you know that the WorkFile (pgmdef>>ZZ412>>F6>>WorkFile) is "MEDPAY" and the prefix is "OUT". So, if you look at the PROCEDURE DESCRIPTION (code) you can look for things that start with "OUT-" to identify fields that are being written to or read from, and look for "MEDPAY" to find where records are being committed to that file. You're on your way. By the way...a word to the wise, you might want to move over to your DEV server while you are poking around...
Kelly Meade
J. R. Simplot Company
Boise, ID
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
Thanks...yeah....I didnt plan on modding the code or anything but working on the DEV server is wise. I have to dig through this code which I am very unfamiliar with and see if I can find out if this program only grabs certain departments in our facility or if it uses all of them for the output.
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
I found in the working storage area this position table...I am guessing this is what is defining only certain positions for the report. How would I pull "ALL" positions we actually have in our lawson position table...would I just deleted those 03 FILLERS?? Example: 02 POSITION-TABLE. 03 FILLER PIC X(17) VALUE "40601032610060101". 03 FILLER PIC X(17) VALUE "40601032610160101". 03 FILLER PIC X(17) VALUE "40601032610260101". 03 FILLER PIC X(17) VALUE "40601032610360101". 03 FILLER PIC X(17) VALUE "40601032610460101". 03 FILLER PIC X(17) VALUE "40601033600160101". 03 FILLER PIC X(17) VALUE "40611033600161101". 03 FILLER PIC X(17) VALUE "40612033600061201". 03 FILLER PIC X(17) VALUE "40618033600061801". 03 FILLER PIC X(17) VALUE "40622033600162201". 03 FILLER PIC X(17) VALUE "40625033600062501". 02 POSITION-TABLE-RED REDEFINES POSITION-TABLE. 03 POS-TABLE-OCCURS OCCURS 220 TIMES. 04 WS-POSITION PIC X(12). 04 WS-POSITION-DEPT PIC X(04). 04 WS-CATEGORY PIC X(01).
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
No one???
Ronnie
Veteran Member Send Private Message
Posts: 152
Veteran Member
OK....I edited the cobol with the help of someone. I am not familiar with needing to recompile the programs in lawson. Is all I would need to do a qcompile TEST PR ZZ412 ????
Greg Moeller
Veteran Member Send Private Message
Posts: 1498
Veteran Member
You MAY have to do a lstinvk -q TEST ZZ412 first... then let all of those jobs compile then do your qcompile.
Greg Moeller
Veteran Member Send Private Message
Posts: 1498
Veteran Member
Oh.. forgot one step delete all of your int files first... on Unix it's [code]rm -rf $LAWDIR/prodline/*src/int/* [/code] Then lstinvk Then qcompile