Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SZWESAMP(ZWEIMVS): IEBCOPY update or replace by IDCAMS #4185

Closed
Martin-Zeithaml opened this issue Feb 11, 2025 · 1 comment
Closed

SZWESAMP(ZWEIMVS): IEBCOPY update or replace by IDCAMS #4185

Martin-Zeithaml opened this issue Feb 11, 2025 · 1 comment

Comments

@Martin-Zeithaml
Copy link
Contributor

SZWESAMP(ZWEIMVS)

Is using IEBCOPY, which has funny syntax, you can't specify the output name if the name is identical to original one:

  • To copy ZWESIP00 as ZWESIP00: SELECT MEMBER=((ZWESIP00,,R))
  • To copy ZWESIP00 as ZWESIP01: SELECT MEMBER=((ZWESIP00,ZWESIP01,R))

Question

Does anyone know how to solve this with IEBCOPY?

Possible solution

IDCAMS supports syntax, where you can specify same or different name! What a feature, right?
IDCAMS is already used in some other JCL sample.

Pros

  • It will simplify the zwe init mvs code, where we are (in Migrate to JCL) joggling with the parm name.

Cons

  • We have to use the SET statement
  • I know this is not preferable solution for some customers
  • // DSN={zowe.setup.dataset.parmlib}({zowe.setup.dataset.parmlibMembers.zis}) would fail on record length as the first variable would be replaced, entire line will not fit into 80 chars
//MEMBCPY EXEC PGM=IDCAMS                              
//  SET OUTPARM={zowe.setup.dataset.parmlibMembers.zis}
//SYSPRINT DD  SYSOUT=*                                
//PARMIN  DD DISP=SHR,                                 
//  DSN={zowe.setup.dataset.prefix}.SZWESAMP(ZWESIP00) 
//PARMOUT DD DISP=OLD,                                 
//  DSN={zowe.setup.dataset.parmlib}(&OUTPARM)         
//SYSIN DD *                                           
  REPRO INFILE(PARMIN) OUTFILE(PARMOUT)                
//*                                                    
@Martin-Zeithaml
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants