Rexx questions and an odd Error in REXX -


i created rexx program read in file argument , line line add array there have added pulls define search criteria , search array, wanted dynamically add new member pds , fill search outcome. works throws bunch of errors.

this code

/* rexx read file */                         /*                            */             /*                            */             /*                            */             /*                            */             arg infile                                   if arg() = 0                                                                       'input required'                         exit                                         end                                          /*                            */             /*                            */             'what string looking for' pull searchline                              if searchline = ""                                                                     'you did not enter string'             'please enter 1 now'                pull searchline                         end                                    /*                            */          /*                            */          /*                            */          /* validating file existance*/              inddfile = infile                           "listc nvsam ent('"inddfile"') "             if rc = 0                                                                              "found" inddfile                          end                                           else                                        inddfile 'not found'                 exit                                      end                                        /**************************************/  "alloc f(infile) dsn('"inddfile"')shr reu"   "execio * diskr infile ( finis stem myfile." "free f(infile)"                             strleng = length(searchline)                 index = 0                                        = 1                                        while <= myfile.0                         result = pos(searchline,myfile.i)               if result /= 0                                                                       match.index =left(myfile.i,12)               match.index                              index                                    index = index +1                             end                                    = + 1                                    end                                          "what out put file? "            pull file                                                    file1 = file                                                 "what member called?"                        pull member                                                  /*******************************************/                /*******************************************/                adress tso                                                       "alloc da('"file1"') f(abcd) new space(10,20)dir(100)tracks" "free f(abcd)"                                               /*******************************************/                "alloc fi(abcd) da('"file1"("member")')shr"                  "execio" index "diskw abcd (stem match. finis"               "free f(abcd)"                                               if rc <> 0                                            "error in allocating pds member" rc                  end                                                         exit       

this error

command adress not found
63 - adress tso
+++ rc(-3) +++ data set qxgcvnh.outlib not allocated+ igd17101i data set q*****h.outlib not defined because duplicate name exists in catalog return code 8 reason code 38 igg0cleh file abcd not freed, not allocated

can advise correct errors doesnt run way? , can advise if there way return string enter , not entire line?

thanks

with regard returning string. may wish check out of rexx string handling functions. perhaps strip assist.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -