Advertisement
friedkiwi

Untitled

Jul 25th, 2023
1,118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. def crtdspf(srcfile, tgtlib, tgtfile):    
  2.     tmp_id = random.randint(100000,999999)
  3.     crtlib("BLD%d" % (tmp_id))
  4.     subprocess.call(["system", "crtsrcpf", "FILE(BLD%d/BLD%d)" % (tmp_id, tmp_id), "RCDLEN(132)" ])
  5.     subprocess.call(["system", "cpyfrmstmf", "FROMSTMF('%s')" % (sanitize_path(srcfile)), "TOMBR('/QSYS.LIB/BLD%d.LIB/BLD%d.FILE/BUILD.MBR')" % (tmp_id, tmp_id), "MBROPT(*ADD)"])
  6.     subprocess.call(["system", "crtdspf", "FILE(%s/%s)" % (tgtlib, tgtfile), "SRCFILE(BLD%d/BLD%d)" % (tmp_id, tmp_id), "SRCMBR(BUILD)"])
  7.     subprocess.call(["system", "dsplib", "BLD%d" % (tmp_id)])
  8.     dltlib("BLD%d" % (tmp_id))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement