I am facing an issue while calling the PKUNZIP via EZT(Easytrieve) Pgm.
Following code was developed by me:
PARM ABEXIT SNAP +
LINK (EZTUNPGM R)
FLI-REC 1 80 A
FLI-REC-TYP 1 1 A
FLI-DSN 1 17 A
FLI-DSN-PFX 1 4 A
FLI-TRANS-ID 3 8 A
DSN-REC 1 80 A
DSN-REC-LEN 1 4 A
DSN-BLK-SZE 10 5 A
DSN-FLE-FMT 20 2 A
FDSN-DATASET-ZIP 1 20 A
FDSN-DATASET-UNZIP 22 20 A
FDSN-DATASET-UNZIP-PFX 22 5 A
FDSN-DATASET-UNZIP-SLJD 27 8 A
FDSN-TRANSMIT-ID 45 8 A
WA-DSN W 17 A
WA-DSN-PFX WA-DSN 10 A
WA-DSN-JDTE WA-DSN +10 3 A
WA-DSN-SLJD WA-DSN +5 8 A
WA-DSN-SFX WA-DSN +13 4 A VALUE '.ZIP'
WA-UNZIP-PARM W 224 A
WA-UZP-LENGTH WA-UNZIP-PARM 2 B VALUE 221
WA-UZP-FLD1 WA-UNZIP-PARM +2 6 A VALUE '-ECHO '
WA-UZP-FLD2 WA-UNZIP-PARM +8 9 A VALUE '-ARCHIVE('
WA-UZP-ADSN WA-UNZIP-PARM +17 17 A
WA-UZP-ADSN-END WA-UNZIP-PARM +34 2 A VALUE ') '
WA-UZP-FLD4 WA-UNZIP-PARM +36 14 A VALUE '-OUTVOL(WORK) '
WA-UZP-FLD5 WA-UNZIP-PARM +50 19 A +
VALUE '-PASSWORD(PICKLES) '
WA-UZP-FLD6 WA-UNZIP-PARM +69 11 A +
WA-UZP-BSZE WA-UNZIP-PARM +80 5 A
WA-UZP-BSZE-END WA-UNZIP-PARM +85 2 A VALUE ') '
WA-UZP-FLD7 WA-UNZIP-PARM +87 8 A VALUE '-OUTLRL('
WA-UZP-LREC WA-UNZIP-PARM +95 4 A
WA-UZP-LREC-END WA-UNZIP-PARM +99 2 A VALUE ') '
WA-UZP-FLD8 WA-UNZIP-PARM +101 9 A VALUE '-OUTTYPE('
WA-UZP-FFMT WA-UNZIP-PARM +110 2 A
WA-UZP-FFMT-END WA-UNZIP-PARM +112 2 A VALUE ') '
WA-UZP-FLD9 WA-UNZIP-PARM +114 25 A +
VALUE '-OUTFILE_SPACE_TYPE(CYL) '
WA-UZP-FLD10 WA-UNZIP-PARM +139 28 A +
VALUE '-OUTFILE_SPACE_PRIMARY(900) '
WA-UZP-FLD11 WA-UNZIP-PARM +167 30 A +
VALUE '-OUTFILE_SPACE_SECONDARY(100) '
WA-UZP-FLD12 WA-UNZIP-PARM +197 11 A VALUE '-OVERWRITE '
WA-UZP-FLD13 WA-UNZIP-PARM +208 16 A +
VALUE '-HLQ(/USER.) '
* WORKING STORAGE
WA-TRANS-ID W 8 A
JOB INPUT (NULL)
IF EOF DSNIN
IF EOF DSNDTL
IF FLI-REC-TYP = 'T'
WA-TRANS-ID = FLI-TRANS-ID
WA-DSN = FLI-DSN
WA-UZP-ADSN = WA-DSN
WA-UZP-LREC = DSN-REC-LEN
WA-UZP-BSZE = DSN-BLK-SZE
WA-UZP-FFMT = DSN-FLE-FMT
CALL PKUNZIP USING WA-UNZIP-PARM
FDSN-DATASET-ZIP = WA-DSN
FDSN-DATASET-UNZIP-PFX = 'USER.'
FDSN-DATASET-UNZIP-SLJD = WA-DSN-SLJD
FDSN-TRANSMIT-ID = WA-TRANS-ID
Please find the attached SYSPRINT log for the PGM.
I have framed the PARM as required by the PKUNZIP Utility but still there are some input which is missed by me.
Easytrieve Plus only does *dynmic* CALLs*. You can linkedit as much as you like, it is not going to affect the outcome.
Easytrieve Plus does its own linkediting (I think it calls the linkeditor to do it).
If you linkeditt a loadmodule which does dynamic CALLs and has already been linkedited, it doesn't do any harm, but it doesn't affect the outcome.
I have never found a difference in operation between execution of a compiled Easytrieve Plus program and execution of EZTPA00 with the same source. Why? Because they are identical procesesss. It is just that with EZTPA00 *running* the source the assembler code is generated, linkedited (for the run) and thrown away.
In the original information you provided, it looked like some of the compiler work-area was being included as part of your parameter to PKZIP. In the catalogued version of the program, that work-area will not be there. The storage looked at by PKZIP msy be something that PKZIP ignores (space, binary zero, non-display, who knows?) But I'd not like to count on it being OK every time.
I would not run that with Production data until I'd fixed it, or Pansop..., sorry, CA told me it was OK.
Try the compile-and-go again with the ENVIRONMENT on it.
As Dick has suggested, try to call PKZIP dynamically from a COBOL program. If it works from a COBOL program it will work from Easytrieve Plus.
If you can't get compile-and-run and compile-catalog-and-run-later to give you the same results, pass it over the CA Support.