Yep, I am doing LMFREE and LMCLOSE, but I had introduced an error when I
included an INTERATE command in the middle of a DO/END and so in a specific
situation, the LMFREE/LMCLOSE would not get executed.
And then in the subsequent iteration, I would see the LMOPEN error.
I got a return code of 8, but did not see any additional information and I
completely forgot (old age?) I should be dumping out zerrsm and zerrlm.
I should ALWAYS execute the REXX statements in green, but when I arrive in the
yellow code, I skip over the LMFEE/LMCLOSE which causes grief with the
subsequent iterations.
/* Copy all members from VSAM library. No exceptions here */
"LMMLIST Dataid("Nbkp") OPTION(LIST) STATS(NO)",
"MEMBER(rComp)"
If rc >= 4 Then Do
errMsg1 = ' Member 'rComp' not found in Backup library.'
errMsg2 = ' Data was not replaced.'
say errMsg1
say errMsg2
Iterate ********* This causes an issue for subsequent iterations
of the DO/END
/* signal evac */
End
Else Do
replFl = 'REPLACE'
"LMMOVE FROMID("Nbkp") TODATAID("Nlib")",
"FROMMEM("rComp") "replFl
If rc /= 0 Then Do
errMsg1 = "LMMOVE error for "rComp
errMsg2 = "Return code was "rc
exRC = rc
signal evac
End
Else Do
rptRsn = 'Move from N-Backup library complete'
End
End
call buildrpt
"LMMLIST Dataid("Nbkp") OPTION(free)"
"LMCLOSE Dataid("Nlib")"
"LMFREE Dataid("Nbkp")"
"LMFREE Dataid("Nlib")"
End
Thanks
…….Cameron
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Hobart Spitz
Sent: Sunday, February 5, 2023 1:56 PM
To: [email protected]
Subject: [External] Re: Having a little difficulty with a REXX command LMOPEN
Are you doing LMFREE, on the dataid from LMINIT, when you are finished with
each library?
It sounds like you are exceeding resources for LMINITs.
I don't think FREE/CLOSE is needed. LMINIT and LMFREE are faster, more
reliable and easier to use.
It also sounds like you are not getting the return code back so you can
display zerrsm and zerrlm. (Unless you did this and I missed it.) You may
need to issue SIGNAL OFF ERROR, and/or ADDRESS ISPEXEC "CONTROL ERRORS
RETURN". Otherwise your program won't be able to report what happened.
Please study and understand Lionell's example. Your outer (library) loop
should include all of those elements.
We still need to see your code as written; I'm just guessing from your
description. There could be something you are doing that I have not
considered.
OREXXMan
Q: What do you call the residence of the ungulate with the largest antlers?
A: A moose pad.
:-D
Would you rather pass data in move mode (*nix piping) or locate mode
(Pipes) or via disk (JCL)? Why do you think you rarely see *nix commands
with more than a dozen filters, while Pipelines specifications are commonly
over 100s of stages, and 1000s of stages are not uncommon.
REXX is the new C.
On Sun, Feb 5, 2023 at 11:51 AM Cameron Conacher <
[email protected]<mailto:[email protected]>>
wrote:
> Thanks a ton everyone.
> Just a dumb User issue here (me).
>
> I have a DO loop, and at the bottom of the loop I manage the cleanup
> (FREE/CLOSE)
> However, inside the loop I had some code where I would report an
> encountered error, and then issue ITERATE to work with the next input
> library member.
> In this situation I never actually got to the bottom of the Loop and I
> never issued the FREE/CLOSE.
> The next time I tried an LMOPEN on the same library, it failed.
>
> Appreciate the helpful information.
> I did not remember I could dump the zerrsm and zerrlm to get additional
> information.
>
> Thanks
>
> .......Cameron
>
> From: IBM Mainframe Discussion List
> <[email protected]<mailto:[email protected]>> On Behalf
> Of Lionel B. Dyck
> Sent: Friday, February 3, 2023 8:39 AM
> To: [email protected]<mailto:[email protected]>
> Subject: [External] Re: Having a little difficulty with a REXX command
> LMOPEN
>
> Here is a sample that I wrote awhile ago to better understand how lmcopy
> works - hope this helps - no lmopen required.
>
> /* ------- REXX ------- *
> * test code for lmcopy *
> * -------------------- */
> in = 'hlq.test.pds'
> out = 'hlq.test.pdse'
> Address ISPexec
> "lminit dataid(indd1) dataset('"in"')"
> "lminit dataid(outdd1) dataset('"out"')"
> "lmcopy fromid("indd1") todataid("outdd1")" ,
> "frommem(a*) replace"
> "lmcopy fromid("indd1") todataid("outdd1")" ,
> "frommem(b*) replace"
> "lmfree dataid("indd1")"
> "lmfree dataid("outdd1")"
>
>
> Lionel B. Dyck <><
> Website:
> https://www.lbdsoftware.com<https://isolate.menlosecurity.com/1/3735928037/https:/www.lbdsoftware.com><
> https://isolate.menlosecurity.com/1/3735928037/https:/www.lbdsoftware.com>
> Github:
> https://github.com/lbdyck<https://isolate.menlosecurity.com/1/3735928037/https:/github.com/lbdyck><
> https://isolate.menlosecurity.com/1/3735928037/https:/github.com/lbdyck>
>
> "Worry more about your character than your reputation. Character is what
> you
> are, reputation merely what others think you are." - - - John Wooden
>
> -----Original Message-----
> From: IBM Mainframe Discussion List
> <[email protected]<mailto:[email protected]><mailto:
> [email protected]<mailto:[email protected]>>> On Behalf Of
> Cameron Conacher
> Sent: Friday, February 3, 2023 7:19 AM
> To:
> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
> Subject: Having a little difficulty with a REXX command LMOPEN
>
> Good Morning,
> I have a small REXX which essentially copies members of one PDSE to
> another.
>
> It iterates over members of the first PDSE and copies the members to the
> second PDSE.
>
> After about eighty members are copied, my LMOPEN fails with a return code
> of
> 8.
> I checked the manual and a return code of 8 from an LMOPEN means "The
> Dataset cannot be opened."
> 8
> Data set could not be opened.
>
>
> Is there somewhere I can see a bit more detail. Why the dataset could not
> be
> opened?
> I see nothing in the JES Log.
>
> Any thoughts appreciated.
>
> Thanks
>
>
> Cameron Conacher
> Senior Engineer
>
> American Express Canada Inc.
> GCICS
> 2225 Sheppard Avenue East, Toronto, ON M2J 5C2
>
> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>><mailto:
> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
> Office: 1-437-836-5265
> Mobile: 1-416-409-5147
>
> https://amex.webex.com/join/cameron.conacher
>
> Note: I will be away from the office on PTO Friday February 3, 2023
>
> ________________________________
> American Express made the following annotations
> ________________________________ This e-mail was sent to you by a
> representative of Amex Bank of Canada, P.O. Box 3204, Station "F", Toronto,
> ON, M1W 3W7,
> www.americanexpress.ca<https://isolate.menlosecurity.com/1/3735928037/http:/www.americanexpress.ca><
> https://isolate.menlosecurity.com/1/3735928037/http:/www.americanexpress.ca>.
> If you no longer wish to receive these
> e-mails, please notify the sender by reply e-mail.
>
> This e-mail is solely for the intended recipient and may contain
> confidential or privileged information. If you are not the intended
> recipient, any disclosure, copying, use, or distribution of the information
> included in this e-mail is prohibited. If you have received this e-mail in
> error, please notify the sender by reply e-mail and immediately and
> permanently delete this e-mail and any attachments. Thank you.
>
> American Express a fait les remarques suivantes Ce courriel vous a ?t?
> envoy? par un repr?sentant de la Banque Amex du Canada, C.P. 3204,
> succursale F, Toronto (Ontario) M1W 3W7,
> www.americanexpress.ca<https://isolate.menlosecurity.com/1/3735928037/http:/www.americanexpress.ca><
> https://isolate.menlosecurity.com/1/3735928037/http:/www.americanexpress.ca>.
> Si, par la
> suite, vous ne souhaitez plus recevoir ces courriels, veuillez en aviser
> les
> exp?diteurs par courriel.
>
> Ce courriel est r?serv? au seul destinataire indiqu? et peut renfermer des
> renseignements confidentiels et privil?gi?s. Si vous n'?tes pas le
> destinataire pr?vu, toute divulgation, duplication, utilisation ou
> distribution du courriel est interdite. Si vous avez re?u ce courriel par
> erreur, veuillez en aviser l'exp?diteur par courriel et d?truire
> imm?diatement le courriel et toute pi?ce jointe. Merci.
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send email
> to
> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
> with the
> message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to
> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
> with the message: INFO IBM-MAIN
> ________________________________
> American Express made the following annotations
> ________________________________
> This e-mail was sent to you by a representative of Amex Bank of Canada,
> P.O. Box 3204, Station "F", Toronto, ON, M1W 3W7,
> www.americanexpress.ca<https://isolate.menlosecurity.com/1/3735928037/http:/www.americanexpress.ca>.
> If you no longer wish to receive these e-mails, please notify the sender by
> reply e-mail.
>
> This e-mail is solely for the intended recipient and may contain
> confidential or privileged information. If you are not the intended
> recipient, any disclosure, copying, use, or distribution of the information
> included in this e-mail is prohibited. If you have received this e-mail in
> error, please notify the sender by reply e-mail and immediately and
> permanently delete this e-mail and any attachments. Thank you.
>
> American Express a fait les remarques suivantes
> Ce courriel vous a ?t? envoy? par un repr?sentant de la Banque Amex du
> Canada, C.P. 3204, succursale F, Toronto (Ontario) M1W 3W7,
> www.americanexpress.ca<https://isolate.menlosecurity.com/1/3735928037/http:/www.americanexpress.ca>.
> Si, par la suite, vous ne souhaitez plus recevoir
> ces courriels, veuillez en aviser les exp?diteurs par courriel.
>
> Ce courriel est r?serv? au seul destinataire indiqu? et peut renfermer des
> renseignements confidentiels et privil?gi?s. Si vous n'?tes pas le
> destinataire pr?vu, toute divulgation, duplication, utilisation ou
> distribution du courriel est interdite. Si vous avez re?u ce courriel par
> erreur, veuillez en aviser l'exp?diteur par courriel et d?truire
> imm?diatement le courriel et toute pi?ce jointe. Merci.
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected]<mailto:[email protected]> with
> the message: INFO IBM-MAIN
>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected]<mailto:[email protected]> with
the message: INFO IBM-MAIN
________________________________
American Express made the following annotations
________________________________
This e-mail was sent to you by a representative of Amex Bank of Canada, P.O.
Box 3204, Station "F", Toronto, ON, M1W 3W7, www.americanexpress.ca. If you no
longer wish to receive these e-mails, please notify the sender by reply e-mail.
This e-mail is solely for the intended recipient and may contain confidential
or privileged information. If you are not the intended recipient, any
disclosure, copying, use, or distribution of the information included in this
e-mail is prohibited. If you have received this e-mail in error, please notify
the sender by reply e-mail and immediately and permanently delete this e-mail
and any attachments. Thank you.
American Express a fait les remarques suivantes
Ce courriel vous a été envoyé par un représentant de la Banque Amex du Canada,
C.P. 3204, succursale F, Toronto (Ontario) M1W 3W7, www.americanexpress.ca. Si,
par la suite, vous ne souhaitez plus recevoir ces courriels, veuillez en aviser
les expéditeurs par courriel.
Ce courriel est réservé au seul destinataire indiqué et peut renfermer des
renseignements confidentiels et privilégiés. Si vous n’êtes pas le destinataire
prévu, toute divulgation, duplication, utilisation ou distribution du courriel
est interdite. Si vous avez reçu ce courriel par erreur, veuillez en aviser
l’expéditeur par courriel et détruire immédiatement le courriel et toute pièce
jointe. Merci.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN