PxPlus User Forum

Twitter Twitter Twitter

Author Topic: need to skip the passworded programs  (Read 981 times)

Jim Morton

  • Member
  • **
  • Posts: 12
    • View Profile
need to skip the passworded programs
« on: August 18, 2023, 01:14:40 PM »
How can I programmatically tell if a program is passworded?
I have a process that copies all programs and I need to skip the passworded ones since *ufc errors on them.
fin() and fib() don't seem to hold that info.

TIA

Ken Sproul

  • Gold Member
  • ****
  • Posts: 60
    • View Profile
Re: need to skip the passworded programs
« Reply #1 on: August 18, 2023, 01:43:54 PM »
Jim,


Got this info from program *udv:


passworded=0
open input (hfn,isz=512)"program"; read record (lfo)r$; close(lfo)
if and(r$(90,1),$01$)=$01$ then passworded=1

Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

Jim Morton

  • Member
  • **
  • Posts: 12
    • View Profile
Re: need to skip the passworded programs
« Reply #2 on: August 18, 2023, 01:59:45 PM »
I thought I'd seen that test somewhere but could not find it.
Thanks Ken!