Newsletters Subscriptions Forums Media Kit About Us Contact Search Home

mgo
OS/400 Edition
Volume 3, Number 71 -- October 22, 2003

Where Is My Source Code?


Hey, Ted:

In the April 4 edition of Midrange Guru, the first tip tells how to find out which source member was used to create both OPM and ILE programs. How can I determine which source member was used to create a file?

--Larry


Use the Display Object Description (DSPOBJD) command. As I've written before, I consider DSPOBJD to be one of the handiest commands on the system.

DSPOBJD OBJ(MYLIB/MYFILE) OBJTYPE(*FILE)

Choose option 8 to view the service attributes.

You may want to take this a step further and go directly to the source code. Here is the source code for a command I call FS (Find Source):

/* =============================================================== */ 
/* FS - Find source code for an object                             */ 
/* =============================================================== */ 
/* To create:                                                      */ 
/*                                                                 */ 
/*     CRTCMD CMD(XXX/FS) PGM(*LIBL/FSC)                           */ 
/*            SRCFILE(XXX/QCMDSRC) SRCMBR(FS)                      */ 
/* =============================================================== */ 
                                                                      
             CMD        PROMPT('Find source for an object')           
                                                                      
             PARM       KWD(OBJECT) TYPE(Q1) MIN(1) PROMPT('Object')  
             PARM       KWD(TYPE) TYPE(*CHAR) LEN(10) MIN(1) +        
                          EXPR(*YES) PROMPT('Object type')            
             PARM       KWD(OPTION) TYPE(*CHAR) LEN(1) RSTD(*YES) +   
                          DFT(M) VALUES(D E M) EXPR(*YES) +           
                          CHOICE('D=Display, E=edit, M=message') +    
                          PROMPT('Option')                            
                                                                      
 Q1:         QUAL       TYPE(*NAME) MIN(1) EXPR(*YES)                 
             QUAL       TYPE(*NAME) DFT(*LIBL) SPCVAL((*LIBL) +       
                          (*CURLIB)) EXPR(*YES) PROMPT('Library')

Here is the command-processing program, FSC.

/* =============================================================== */ 
/* FS - Find source code for an object                             */ 
/* =============================================================== */ 
/* To create:                                                      */ 
/*                                                                 */ 
/*    CRTCLPGM   PGM(XXX/FSC) SRCFILE(XX/QCLSRC) SRCMBR(FSC)       */ 
/* =============================================================== */ 
                                                                      
PGM        PARM(&QOBJ &OBJTYPE &OPTION)                               
                                                                      
   DCL  &QOBJ       *CHAR   21                                        
   DCL  &OBJNAME    *CHAR   10                                        
   DCL  &OBJTYPE    *CHAR   10                                        
   DCL  &OBJLIB     *CHAR   10                                        
   DCL  &OPTION     *CHAR    1                                        
                                                                      
   DCLF QADSPOBJ                                                      
                                                                      
   DCL  &ERROR      *LGL                                              
   DCL  &MSGDTA     *CHAR   80                                        
   DCL  &MSGID      *CHAR    7                                        
   DCL  &MSGF       *CHAR   10                                        
   DCL  &MSGFLIB    *CHAR   10

   MONMSG     MSGID(CPF0000) EXEC(GOTO ABEND)              
                                                           
   CHGVAR     VAR(&OBJNAME) VALUE(%SST(&QOBJ  1 10))       
   CHGVAR     VAR(&OBJLIB)  VALUE(%SST(&QOBJ 11 10))       
                                                           
   CHKOBJ     OBJ(&OBJLIB/&OBJNAME) OBJTYPE(&OBJTYPE)      
                                                           
   DSPOBJD OBJ(&OBJLIB/&OBJNAME) OBJTYPE(&OBJTYPE) +       
             OUTPUT(*OUTFILE) OUTFILE(QTEMP/QADSPOBJ)      
                                                           
   OVRDBF     FILE(QADSPOBJ) TOFILE(QTEMP/QADSPOBJ)        
   RCVF                                                    
   MONMSG CPF0864 EXEC(RETURN)                             
                                                           
   IF         COND(&OPTION *EQ 'E') THEN(STRSEU +          
                SRCFILE(&ODSRCL/&ODSRCF) SRCMBR(&ODSRCM) + 
                OPTION(2))                                 
   ELSE       CMD(IF COND(&OPTION *EQ 'D') THEN(STRSEU +   
                SRCFILE(&ODSRCL/&ODSRCF) SRCMBR(&ODSRCM) + 
                OPTION(5)))                                
   ELSE       CMD(SNDPGMMSG MSG('Source is located in +    
                member' *BCAT &ODSRCM *BCAT 'in file' +
                *BCAT &ODSRCL *TCAT '/' *CAT &ODSRCF +        
                *TCAT '.') MSGTYPE(*COMP))                    
                                                              
   DLTOVR     FILE(QADSPOBJ)                                  
   RETURN  /* normal end of job */                            
                                                              
ABEND: /* Abnormal end routine */                             
   /* prevent loop in Abend routine */                        
   IF         COND(&ERROR) THEN(RETURN)                       
   CHGVAR     VAR(&ERROR) VALUE('1')                          
                                                              
   /* resend the error msg to the caller */                   
   RCVMSG     MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID) +  
                MSGF(&MSGF) SNDMSGFLIB(&MSGFLIB)              
   SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +            
                MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE)              
                                                              
ENDPGM

FS gives you three options: to see the name of the source member in a message, to view the source in SEU, or to edit in SEU.

If you like this command, you may want to create some SEU options to run it from the WRKOBJPDM screen. For example, you might place the following command behind option ES to edit source code.

FS OBJECT(&L/&N) TYPE(&T) OPTION(E)

--Ted


Sponsored By
GST

AIT Backup for iSeries

GST, Inc.
Phone: 866-478-4621 or 949-900-1090 (for sales x 300)
Web: http://www.gstinc.com
Email: sales@gstinc.com

---------------------------------------------------------------------

SUMMARY

Compact, modular and reliable backup solution at unbeatable prices

· Powerful 3lb drive in small form factor
· LCD module for backup effiency
· Capacity up to 260GB
· Speed up to 112GB/hour
· LVD, HVD, and fibre connectivity
· Starts at $2,000 USD

---------------------------------------------------------------------

THE BIG PICTURE

· A single AIT tape drive in external, modular, stackable enclosure.
· Capacity: AIT-3 100GB native (260 GB compressed).
· Speed: AIT-3 43GB/hour native (112GB/hour compressed).
· Single subsystem is field-upgradeable to dual drive subsystem.
· LCD display panel improves backup efficiency.
· Supports AIT-1, AIT-2 and AIT-3.
· Roadmap to AIT-4, AIT-5, AIT-6.
· AIT range: single drive to enterprise-wide libraries.
· Supports LVD and HVD SCSI connections directly.
· Supports Fibre Channel via our bridges and routers.

The Single AIT Tape Subsystem is part of GST's EntryDR™ family. Single AIT Tape Subsystems are housed in upgradeable modular enclosures. This subsystem delivers high-performance and high reliability at cost-effective pricing to meet basic backup needs for the small to medium range of servers.

Building-block modularity enables the Single AIT Tape Subsystem to be upgraded to GST's Dual AIT Tape Subsystem to strengthen disaster recovery protection. An LCD panel provides an advanced operator interface for visibility over the backup operation.

The Single AIT Tape Subsystem can backup IBM eServer family members: iSeries, pSeries and xSeries servers. They connect natively with LVD (low voltage differential) and HVD (high voltage differential) SCSI connections, and with Fibre Channel (FC) through our BridgeLink™ family of bridges and SanMatrix™ family of routers. Model overview.

GST's Single AIT Tape Subsystem is available in a variety of models. Each AIT technology (AIT-1, AIT-2, AIT-3) is available in two server-to-SCSI Adapter interfaces:

LOW VOLTAGE DIFFERENTIAL (LVD). Connectivity with eServer family. iSeries uses IBM SCSI Adapter feature code: FC 5702, 5705. pSeries and xSeries servers use a variety of LVD SCSI adapters.

HIGH VOLTAGE DIFFERENTIAL (HVD). Connectivity with eServer family. iSeries uses IBM SCSI Adapter feature code: FC 2729, 2749, 6501, 6534. pSeries and xSeries servers use a variety of HVD SCSI adapters.

AIT TECHNOLOGY

AIT tape technology has evolved through three generations: AIT-1, AIT-2 and AIT-3 and provides outstanding capacity and performance with a highly stable technology roadmap. AIT cartridges utilize Memory-in-Cassette (MIC) architecture providing rapid time-to-data and multiple load points for partitioning data.

Native cartridge capacities for AIT-1, AIT-2 and AIT-3 are 35GB, 50GB and 100GB (91GB, 130GB, 260GB compressed) with speeds of 14GB/hour, 22GB/hour and 43GB/hour (37GB/hour, 56GB/hour and 112GB/hour compressed). Scalability is planned to a 6th generation product with native capacity of 800GB (2TB compressed) and a speed of 345GB/hour (900GB/hour compressed). A 2-to-1 compression ratio is achieved with Adaptive Lossless Data Compression (ALDC) technology.

KEY BENEFITS

DUAL DRIVE UPGRADE - A second modular drive and controller can be added later to upgrade to a Dual AIT Tape Subsystem as backup needs evolve that require DR protection, fault tolerant backup or greater unattended backup capacity.

HARDWARE INVESTMENT PROTECTION - The modular design of the Single AIT Tape Subsystem protects user investment by permitting the original single drive unit to be retained unmodified as part of the upgraded Dual AIT Tape Subsystem.

SPACE SAVER - The small dimensions and weight of the modular configurations facilitate the optimum use of datacenter space.

MEDIA INVESTMENT PROTECTION - For IT sites with an investment in AIT-1 media and drives, the newer AIT-2 and AIT-3 technologies are backward-read compatible, and forward-read compatible to future generations.

SERVICEABILITY - Modularity of design permits individual drives to be easily replaced in building-block fashion by the user.

KEY FEATURES

STACKABLE ENCLOSURES - Individual modular enclosures enable each drive and the mirrored backup controller to be handled as separate building blocks; facilitates field upgrade from single to dual drives.

LCD DISPLAY PANEL - Multi-function LCD continuously displays drive and backup status.

CONVENIENT DRIVE INTERFACE - RS232 interface for updating firmware and optimizing drive performance.

SERVICE AND SUPPORT - A variety of support programs provide installation and onsite service; includes GST's Accelerated Ship Program (GASP) to get replacement units on the scene rapidly.

WARRANTY - Purchase price includes a built-in manufacturer's warranty of three years.

GST, Inc.
Phone: 866-478-4621 or 949-900-1090 (for sales x 300)
Web: http://www.gstinc.com
Email: sales@gstinc.com



THIS ISSUE
SPONSORED BY:

Advanced Systems Concepts
GST


BACK ISSUES

TABLE OF
CONTENTS

How to Call a Stored Procedure from Excel, Part 2

Where Is My Source Code?

Reader Feedback and Insights: Appalled by Lack of Basic Knowledge


Editors
Howard Arner
Joe Hertvik
Ted Holt
David Morris

Managing Editor
Shannon Pastore

Publisher and
Advertising Director:

Jenny Thomas

Advertising Sales Representative
Kim Reed

Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.