Page 1 of 1

Comments

Posted: Wed Jun 25, 2008 8:25 pm
by dinowuff
Random code comments

Code: Select all

'Ok.  There are two important things to remember when looking at this code.
'Dino was here so a lot of the comments are for my benefit (testing stuff).  And if something looks strange
'it's because I have no formal training in any "programming" discipline what so ever
'so if you are trying to fix something here - sorry about your bad luck
'The two files
'IOPWORK and IOPWORK3 are generated on the AS400.  IOPWORK3 is created daily for PA's  
'IOPWORK is the Distributor list and is created by ROBOT once a week.
'Just a side note - Canada and PA's are the only people who actually look at this data
'Why was this written, you ask?  The answer lies in the scope of nonvalued job security
'Oh yeah.  It would have been better to dump the data into a SQL table and just write 
'a few stored proc's but in the beginning I only had to display plain unformated text.
'Talk about scope creep!
In the same application

Code: Select all

Select Case strAction
	Case "show_PA"
        Call DispReport(TYPE_FOR_PA)
    Case "show_Dist"
        Call DispReport(TYPE_FOR_DIST)
	Case "email_report"
    	Call EmailReport()
    'Call RedirectPage("action="& Request("netx_action"))
End Select



' I swear if I hear "Dino about the Critical Dates..." again I'm gonna "EXEC master..xp_regdeletevalue",
     '"@rootkey= HKEY_LOCAL_MACHINE" ,
     '"@key= SOFTWARE\''", EndRant



'Call SetEmailSession( Session("EMAIL"), "Critical Dates", "" )
'Call DispEmailPrintToolBar()

If Left(strAction, 4) = "show" Then
	Call CloseDB_AS400()
Else 
	Call CloseDB()
End If

Posted: Thu Jun 26, 2008 6:27 pm
by outerlimit
I don't know that this does except call a different functions based on strAction

Your comments are amusing though

Posted: Fri Jun 27, 2008 1:12 am
by THE Doctor
# 34 Do not distract the Bastard while coding.


You know you forgot to really arm the code.. it needs a bit of this:

Code: Select all

C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 
C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 
C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 
C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4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C4 C4 C4 
C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 
C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 
You know what to do with it from here ;)

Posted: Mon Jun 30, 2008 6:28 pm
by dinowuff
OK you need TWO files to make a program.

A display file (What the flippen screen is going to look like) and then the actual program CPL.

You have to compile the Display file first.

See if you can tell me what options in the below display file do what.

Code: Select all

0000.10      A*%%TS  SD  20030307  092750  DTY   REL-V5R1M0  5722-WDS   
0000.20      A*  DESCR   : JD Edwards Maintenance Stuff     
0000.30      A*  USED BY : THE Basterd SysAdmin                                           
0000.40      A*  AUTHOR  : Dino                                                
0000.50      A*  DATE    : 05/01/96                                           
0000.60      A*                                                               
0000.70      A* MAINTENANCE HISTORY:                                          
0000.80      A*                                                               
0000.90      A* UPDATE#   DATE   PGMR DESCRIPTION----------------------------*
0001.00      A* 
0001.10      A*                                                               
0001.20      A**************************************************************  
0001.30      A*                                                               
0001.40      A*%%EC                                                           
0001.50      A                                      DSPSIZ(24 80 *DS3)        
0001.60      A                                      REF(*LIBL/DEREF)          
0001.70      A                                      MSGLOC(24)                  
0001.80      A                                      PRINT                       
0001.90      A*                                                                 
0002.00      A*                                                                 
0002.10      A*                                                                 
0002.20      A          R PROMPT                                                
0002.30      A*%%TS  SD  20030307  092750  DTY   REL-V5R1M0  5722-WDS     
0002.40      A                                      CF03(03 'CMD  3=EXIT')      
0002.50      A                                      CF24(24 'CMD 24=COMMAND LIN 
0002.60      A                                  1 73DATE                       
0002.70      A                                      EDTCDE(Y)                  
0002.80      A                                  2 73TIME                       
0002.90      A            USRPRF        10A  O  1  2TEXT('USER PROFILE')       
0003.00      A            WRKSTN        10A  O  2  2TEXT('WORK STATION')       
0003.10      A                                  2 32'MASTER MENU'              
0003.20      A                                      DSPATR(UL)                 
0003.30      A                                      DSPATR(HI)                 
0003.40      A                                  6  2'1. Work with active jobs' 
0003.50      A                                  6 53'9 LAUNCH SPACE SHUTTLE '  
0003.60      A                                  3 79'11'                       
0003.70      A                                  7  2'2. One World Menu'        
0003.80      A                                  8  2'3. Start SQL Session'     
0003.90      A                                 22 13' '                        
0004.00      A                                  7 21' '                        
0004.10      A                                  8 24' '                        
0004.20      A                                  9  2'4. Display Messages'      
0004.30      A                                 13 13' '                              
0004.40      A                                 18 80' '                         
0004.50      A                                 12 80' '                         
0004.60      A                                 18  1' '                         
0004.70      A                                 20 32' '                         
0004.80      A                                 22 11' '                         
0004.90      A            INPUT          2A  I 20 35                            
0005.00      A                                  7 52'24 COMMAND LINE'           
0005.10      A  10                             13  3'Initializing communication 
0005.20      A  11                             14  3'Connection to NASA launch 
0005.30      A                                       refused...  retrying with new  
0005.40      A                                       codes'                          
0005.50      A                                      COLOR(RED)                  
0005.60      A  12                             15  3'Accessing NASA launch code 
0005.70      A  13                             16  4'UPLINK ESTABLISHED..CODE CONFIRMED!' 
0005.80      A  14                             17  4'LAUNCH MODE ENABLED...'    
0005.90      A  15                             18  4'LAUNCH IN PROGRESS!!!!'    
0006.00      A                                 10  2'5. Delete SQL packages'    
0006.10      A                                 23  4'CF03 - Exit'

Posted: Tue Jul 01, 2008 2:20 am
by THE Doctor
JD Edwards
I had to laugh at this.. sorry it's nothing to do with your point..
At my last job.. the site accountant had to the task of working with JDE.. whil assisting her this one day..... I quipped "Jack Daniels" Accounting hey?
Her reply.. "What is it with you IT people and Whiskey?.. every one of you lot make that comment"

then I read about the JD Edwards story..
After discarding the name, Jack Daniels & Co., the group decided that J.D. Edwards sounded better.
pity I read that after I left the company...