AS/400 system upgrade: Need source code of below two objects

45 pts.
AS 400
I am doing system upgrade. Below are two objects not convertible to V7R1.
These are very old third party objects were part of package purchased in  1998 to convert S36 objects to RPG400. These are still being used to sort file somehow I don't know. If I got the source code of these, these can be rewritten in RPGLE. Please help and advise here.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 11  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Splat
    Have you tried RTVCLSRC on the CLP?
    11,830 pointsBadges:
  • ToddN2000
    It could be anything. The library and name are not as important as to who the 3rd party software vendor was. I could have programs with the same name as well as library.. Like Splat mentioned, try the RTVCLSRC. It may work, depending on how the object was created.
    Come back with a vendor name and we might be able to help further.
    95,010 pointsBadges:
  • KapilTiwari2018
    Got below error. RTVCLSRC is not helping
     Selection or command                                                           
     F3=Exit   F4=Prompt   F9=Retrieve   F12=Cancel   F13=Information Assistant     
     F16=System Main menu                                                           
     Source not available for CL program CHGSRTSRC in PRODLIB.                      

    I am still struggling to get the vendor name, just getting below information from object .
     Creation information:                                                  
       Creation date/time . . . . . . . . . :   09/03/96  14:01:33          
       Created by user  . . . . . . . . . . :   PETE                        
       System created on  . . . . . . . . . :   ALC400B                     
       Object domain  . . . . . . . . . . . :   *USER                       
    Is there not any way to encapsulate these objects somehow so that these can be pushed on V7R1.                      
    45 pointsBadges:
  • Splat
    Either the vendor used ALWRTVSRC(*NO) or removed observability on the CL program (I suspect the former).

    If the objects lack observability, there's no way for the system to unpackage & repackage them.

    Does your organisation have records going back to 1998?  If so you might be able to determine the vendor from purchase orders, invoices, &c.
    11,830 pointsBadges:
  • Splat
    I believe my surmise about ALWRTVSRC(*NO) being employed was incorrect.  

    If the system is stating it can't be converted then it is almost certain the observability has been removed.
    11,830 pointsBadges:
  • KapilTiwari2018
    I am still trying to find vendor . However i am trying to explain how it is being used pgm if anyone gets an idea how to use-

    what i analysed-

    CHGSRTSRC is used to update a source member which is finally referenced in format data command (FMTDATA) to sort our custmast file.

    DCL        VAR(&PM01) TYPE(*CHAR) LEN(2)                   
    DCL        VAR(&PM02) TYPE(*CHAR) LEN(8)                   
    DCL        VAR(&PM03) TYPE(*CHAR) LEN(2)                   
    DCL        VAR(&SORTVALUE) TYPE(*CHAR) LEN(040)            
    DCL        VAR(&TEST) TYPE(*CHAR) LEN(1)                   
    DCL        VAR(&TRUE) TYPE(*CHAR) LEN(1) VALUE('1')        
    SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) +                  
                 MSGDTA('Selecting Customer Records') +        
    DLTF       FILE(CPOINT)                                    
    MONMSG     MSGID(CPF2105)                                  
    DLTF       FILE(AREC)                                      
    MONMSG     MSGID(CPF2105)                               
    CALL       PGM(MOEND)                                   
    RTVDTAARA  DTAARA(*LDA (13 2)) RTNVAR(&PM03)            
    IF         (&PM03 *EQ '07') DO                          
    SNDUSRMSG  MSG('Closing First Month of New Year... Be + 
                 sure prior year has been closed') +        
    CPYF       FROMFILE(PRODLIB/SORTSRC) +                 
                 TOFILE(QTEMP/SORTSRC) +                   
                 FROMMBR(SORT000690) TOMBR(SORTSRC) +      
                 MBROPT(*REPLACE) CRTFILE(*YES)            
    CHGVAR     VAR(&SORTVALUE) VALUE((%SST(*LDA 105 002))) 
    CALL       PGM(CHGSRTSRC) PARM(0003 &SORTVALUE)        
    CHGVAR     VAR(&SORTVALUE) VALUE((%SST(*LDA 105 002))) 
    CALL       PGM(CHGSRTSRC) PARM(0006 &SORTVALUE)        
    CHGVAR     VAR(&SORTVALUE) VALUE((%SST(*LDA 101 002))) 
    CALL       PGM(CHGSRTSRC) PARM(0007 &SORTVALUE)        
    CHGVAR     VAR(&SORTVALUE) VALUE((%SST(*LDA 105 002))) 
    CALL       PGM(CHGSRTSRC) PARM(0010 &SORTVALUE)        
    CHGVAR     VAR(&SORTVALUE) VALUE((%SST(*LDA 101 002))) 
    CALL       PGM(CHGSRTSRC) PARM(0011 &SORTVALUE)        
    CHGVAR     VAR(&SORTVALUE) VALUE((%SST(*LDA 105 002))) 
    CALL       PGM(CHGSRTSRC) PARM(0013 &SORTVALUE)        
    CHGVAR     VAR(&SORTVALUE) VALUE((%SST(*LDA 105 002))) 
    CALL       PGM(CHGSRTSRC) PARM(0016 &SORTVALUE)           
    CHGVAR     VAR(&SORTVALUE) VALUE((%SST(*LDA 101 002)))    
    CALL       PGM(CHGSRTSRC) PARM(0017 &SORTVALUE)           
    CLRPFM     FILE(FILELIBR/CPOINT)                          
    MONMSG     MSGID(CPF3142) EXEC(CRTPF +                    
                 FILE(FILELIBR/CPOINT) RCDLEN(4) +            
    FMTDTA     INFILE((QS36F/CUSTMAST)) +                     
                 OUTFILE(FILELIBR/CPOINT) +                   
    SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) +                 
                 MSGDTA('Building A/R Detail File') +         

    SORT000690 - source member-
    HSORTA    10A                       
    O C 512 512EQCD                     
    OOC 130 131GTC¦(%SST(*LDA.105.002))¦
    OAC 130 131LTC50                    
    O*P 162 165EQC0000000               
    OOC 130 131EQC¦(%SST(*LDA.105.002))¦
    OAC 126 127GTC¦(%SST(*LDA.101.002))¦
    I P 162 165NEC0000000               
    IOP 162 165EQC0000000               
    IAC 130 131EQC¦(%SST(*LDA.105.002))¦
    IAC 126 127EQC¦(%SST(*LDA.101.002))¦
    IOP 162 165EQC0000000               
    IAC 170 171GTC¦(%SST(*LDA.105.002))¦
    IAC 170 171LTC50                    
    IOP 162 165EQC0000000               
    IAC 170 171EQC¦(%SST(*LDA.105.002))¦
    IAC 166 167GEC¦(%SST(*LDA.101.002))¦      
    FNC   1  10                               
    45 pointsBadges:
  • Splat
    How averse are you to doing some rewriting of the code that references those?

    From a quick read of the source it looks to be replaceable by either OPNQRYF or SQL.
    11,830 pointsBadges:
  • KapilTiwari2018
    I m not averse to rewriting this code, just could not understand the sorting the file by this way.

    how OPNQRYF file will be on basis this code.

    pl help me to build OPNQRYF FILE , I a giving custmast structure here

         A                                      UNIQUE
         A          R CUSTMASR                  TEXT('CUSTOMER MASTER FILE')
         A            CSOFF          3A         TEXT('OFFICE')
         A            CSMKT          4A         TEXT('MARKET #')
         A            CSSUFX         3A         TEXT('SUFFIX')
         A            CSBNAM        25A         TEXT('BUSINESS NAME')
         A            CSBADR        25A         TEXT('BUSINESS ADDRESS')
         A            CSBCTY        18A         TEXT('BUSINESS CITY')
         A            CSBST          2A         TEXT('STATE')
         A            CSBZIP         5S 0       TEXT('BUSINESS ZIP CODE')
         A            CSCNAM        20A         TEXT('CUSTOMER NAME')
         A            CSDESC         1A         TEXT('AD TYPE P=PRINT V=VIDEO')
         A            CSCRDT         7P 2       TEXT('CREDIT AMOUNT')
         A            CSSLSM         3S 0       TEXT('PCT OF COMMISSION')
         A            CSCONT         6A         TEXT('CONTRACT')
         A            CSBLMM         2S 0       TEXT('BILLING MONTH')
         A            CSBLDD         2S 0       TEXT('BILLING DAY')
         A            CSBLYY         2S 0       TEXT('BILLING YEAR')
         A            CSSLDM         2S 0       TEXT('SALE MONTH')
         A            CSSLDD         2S 0       TEXT('SALE DAY')
         A            CSSLDY         2S 0       TEXT('SALE YEAR')
         A            CSTELE        11P 0       TEXT('TELEPHONE')
         A            CSWKS          2S 0       TEXT('WEEKS')
         A            CSRATE         7P 2       TEXT('RATE')
         A            CSSETP         7P 2       TEXT('PRODUCTION CHARGE')
         A            CSDNPY         7P 2       TEXT('DOWNPAYMENT')
         A            CSINST         2S 0       TEXT('NUMBER OF INSTALLMENTS')
         A            CSLAST         7P 2       TEXT('LAST PAYMENT AMOUNT')
         A            CSPREV         7P 2       TEXT('PREVIOUS PAYMENT')
         A            CSBAL          7P 2       TEXT('CURRENT BALANCE')
         A            CSDNDT         6S 0       TEXT('LAST PAYMENT DATE')
         A            CSSTAT         1A         TEXT('ACCT STATUS CODE')
         A            CSPBCD         4A         TEXT('UNUSED FIELD')
         A            CSRENL         1A         TEXT('NEW/RENEWAL')
         A            CSIAMT         5P 2       TEXT('INSTALLMENT AMOUNT')
         A            CSPBC2         1A         TEXT('CONVERTED')
         A            CSAOFR         2S 0       TEXT('ADDITIONAL OFFERS')
         A            CSKMFL         1A         TEXT('KILL & MOVE FLAG')
         A            CSFLG1         1A         TEXT('OPTION BONUS C/B')
         A            CSFLG2         1A         TEXT('CONTRACT MOD')
         A            CSDSCD         1A         TEXT('DEAL OF THE DAY')
         A            CSAGCY         2A         TEXT('LEGAL AGENCY CODE')
         A            CSLGMM         2S 0       TEXT('LEGAL MONTH')
         A            CSLGDD         2S 0       TEXT('LEGAL DAY')
         A            CSLGYY         2S 0       TEXT('LEGAL YEAR')
         A            CSLBCD         1A         TEXT('UNUSED LEGAL CODE')
         A            CSSEQ          2S 0       TEXT('SEQUENCE NUMBER')
         A            CSBSCD         2A         TEXT('BUSINESS TYPE CODE')
         A            CSCNFD         6S 0       TEXT('DATE')
         A            CSCZIP         6A         TEXT('CANADA ZIP CODE')
         A            CSHTEL        10P 0       TEXT('CUSTOMER HOME PHONE')
         A            CSASC          5P 2       TEXT('ACCOUNT SERVICE CHARGE')
         A            CSAUTH         5S 0       TEXT('AUTHORIZATION')
         A            CSGST          5P 2       TEXT('GOODS & SERVICES TAX')
         A            CSVALU         1A         TEXT('VALUE')
         A            CSVPCD         1A         TEXT('VP CODE')
         A            CSAUTO         1A         TEXT(' ')
         A            CSADCD         1A         TEXT('ADON CODE')
         A            CSPRCD         2A         TEXT('OLD PROMO CODE')
         A            CSVRFY         1A         TEXT('VERIFY FLAG')
         A            CSSFLG         1A         TEXT('FDC HOLD FLAG')
         A            CSSFMM         2S 0       TEXT('FDC HOLD MONTH')
         A            CSSFDD         2S 0       TEXT('FDC HOLD DAY')
         A            CSSFYY         2S 0       TEXT('FDC HOLD YEAR')
         A            CSPNDT         6S 0       TEXT('PRE-NOTE DATE')
         A            CSHOLD         1A         TEXT('HOLD FLAG')
         A            CSCORP         1A         TEXT('CORPORATE FLAG')
         A            CSOUTT         1A         TEXT('OUT TERRITORY')
         A            CSALTS         3A         TEXT('UNUSED FIELD')
         A            CSCNMM         2S 0       TEXT('CONTRACT MONTH')
         A            CSCNDD         2S 0       TEXT('CONTRACT DAY')
         A            CSCNYY         2S 0       TEXT('CONTRACT YEAR')
         A            CSIDL#        10A         TEXT('INTERNET DEAL')
         A            CSCST#         8S 0       TEXT('CUSTOMER NUMBER')
         A            CSSYSD         8S 0       TEXT('DATE IN SYSTEM')
         A            CSCYC2         1A         TEXT('RTN CYCLE')
         A            CSUSER         8A         TEXT('ENTERED BY NAME')
         A            CSZIP4         4S 0       TEXT('ZIP + 4')
         A            CSADSP         2S 0       TEXT('TOTAL AD SPACES')
         A            CSCORR         1S 0       TEXT('CORRECTION')
         A            CSRENW         1A         TEXT('DO NOT RENEW')
         A            CSEXCL         1A         TEXT('EXCLUSIVE AD')
         A            CSDUPL         1A         TEXT('DUPLICATE AD')
         A            CSDBL          1A         TEXT('DOUBLE SIZE AD')
         A            CSFLG3         1A         TEXT('NO AD COPY')
         A            CSFLG4         1A         TEXT('LATE AD')
         A            CSSTS2         1A         TEXT('STATUS SAVE')
         A            CSCMPM         2S 0       TEXT('STOP MONTH')
         A            CSCMPD         2S 0       TEXT('STOP DAY')
         A            CSCMPY         4S 0       TEXT('STOP YEAR')
         A            CSREP4         8S 0       TEXT('TELEMARKETER REP#')
         A            CSTFLG         1A         TEXT('TELEMARKETER FLAG')
         A            CSBRTR         1A         TEXT('NET 30 FOR PIF')
         A            CSPRMO         8A         TEXT('AD PROMO CODE')
         A            CSDTYP         2A         TEXT('TOTAL CYCLES')
         A            CSTOFF         3A         TEXT('MARKET TERRITORY OFFICE')
         A            CSTERR         2S 0       TEXT('MARKET TERRITORY')
         A            CSTREP         8S 0       TEXT('TERRITORY REP')
         A            CSEMAL         1A         TEXT('E-MAIL FLAG')
         A            CSWEBF         1A         TEXT('WEB SITE FLAG')
         A            CSSID1         1A         TEXT('SIDE 1')
         A            CSSID2         1A         TEXT('SIDE 2')
         A            CSSTYY         4S 0       TEXT('START YEAR')
         A            CSSTMM         2S 0       TEXT('START MONTH')
         A            CSSTDD         2S 0       TEXT('START DAY')
         A            CSCSTR        10A         TEXT('CUSTOMER STORE NUMBER')
         A            CSPCHG         5S 2       TEXT('PRODUCTION CHARGE')
         A            CSFLG5         1A         TEXT('HEADER AD FLAG')
         A            CSFLG6         1A         TEXT('MOBILE MARKETING FLAG')
         A            CSREP1         8S 0       TEXT('REP NUMBER 1')
         A            CSREP2         8S 0       TEXT('REP NUMBER 2')
         A            CSREP3         8S 0       TEXT('REP NUMBER 3')
         A            CSFLG7         1A         TEXT('CONTRACT SERVICES')
         A            CSDATE         8S 0       TEXT('TRAINING REP NUMBER')
         A            CSHAND         1A         TEXT('HAND DELIVERY FLAG')
         A            CSINFL         1A         TEXT('TAPE ALL THE TIME FLAG')
         A            CSRAD          1A         TEXT('REPLACEMENT AD')
         A            CSSCAN         1A         TEXT('INTERNET SCAN')
         A            CSUPLD         1A         TEXT('UPLOAD TO INTERNET')
         A            CSCBMO         2S 0       TEXT('CHARGE BACK MONTH')
         A            CSCBDD         2S 0       TEXT('CHARGE BACK DAY')
         A            CSCBCN         2S 0       TEXT('CHARGE BACK CENTURY')
         A            CSCBYY         2S 0       TEXT('CHARGE BACK YEAR')
         A            CSCGFL         1A         TEXT('CHARGE BACK FLAG')
         A            CSADON         1A         TEXT('ADON FLAG')
         A            CSBLCN         2S 0       TEXT('BILLING CENTURY')
         A            CSSLCN         2S 0       TEXT('SALE CENTURY')
         A            CSBAD2        25A         TEXT('2ND ADDRESS LINE')
         A            CSKILL         1A         TEXT('KILL/NO KILL/REINSTATE')
         A            CSNBAL         9S 2       TEXT('NEW BALANCE FIELD')
         A            CSNAMT         7S 2       TEXT('NEW INSTALLMENT AMT')
         A            CSOINV        10S 0       TEXT('ORIGINAL INVOICE #')
         A            CSCCNT         6A         TEXT('CORPORATE CONTRACT NUMBER')
         A            CSSCOM         1A         TEXT('SUPER COMMISSION FLAG')
         A            CSSYST         6S 0       TEXT('TIME ENTERED')
         A            CSDSEQ         2S 0       TEXT('PROCESSING SEQ')
         A            CSAPCT         3P 0       TEXT('PCT OF CARTS')
         A            CSPCT2         3P 0       TEXT('PCT OF CARTS')
         A            CSFLAG         1A         TEXT('BELOW MINIMUM AD PRICE')
         A            CSFLNM        15A         TEXT('CONTRACT FILE NAME')
         A            CSDT01         8S 0       TEXT('UNUSED DATE')
         A            CSDT02         8S 0       TEXT('UNUSED DATE')
         A            CSFLG8         1A         TEXT('CONTRACT TYPE')
         A            CSFLG9         1A         TEXT('UNUSED FLAG')
         A            CSFUSR         8A         TEXT('CHANGED BY')
         A            CSFLDT         8S 0       TEXT('DATE CHANGED')
         A            CSDEL          1A         TEXT('DELETE CODE')
         A          K CSOFF
         A          K CSMKT
         A          K CSSUFX
    45 pointsBadges:
  • Splat
    This is a skeleton that, hopefully, will get you where you need to be:

    OVRDBF     FILE([File]) SECURE(*YES) SHARE(*YES)         
    OPNQRYF    FILE(([File]))                       	+
               QRYSLT('(([Field 1] *EQ "[Value 1]") *AND	+
                   	    ([Field 2] *EQ [Value 2]))')	+
               KEYFLD(([Field 3]))                          +
    Call program
    DLTOVR	   FILE([File])
    11,830 pointsBadges:
  • KapilTiwari2018
    Which fields are being sorted in SORT000690 - source member. How to get that?
    45 pointsBadges:
  • Splat
    You'll have to look at the file layout & determine what data falls between what positions.

    E.g.:  O C 512 512EQCD 

    If memory serves, the above specifies the sort is to omit any record which has, in positions 512 through 512, the character 'D'.

    11,830 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: