IBM / zowe-cli-cics-deploy-plugin

Provides the cics-deploy plug-in for Zowe CLI https://github.com/zowe/zowe-cli to deploy Node.js and other applications from a workstation to IBM CICS Transaction Server within a CICS bundle. Documentation is available at https://ibm.github.io/zowe-cli-cics-deploy-plugin/
Eclipse Public License 2.0
13 stars 12 forks source link

.zosAttributes should be all lower case in message #271

Closed markcocker closed 5 years ago

markcocker commented 5 years ago

.zosAttributes should be .zosattributes file in the following message:

zowe cics-deploy push bundle --name Policy --overwrite
WARNING: No .zosAttributes file found in the bundle directory, default values will be applied.
Regions in scope 'CICPY00V' of CICSplex 'ZOSPTINT':
   Applid: CICPY00V   jobname: CICPY00V   jobid: STC47025   sysname: MV2C    
PUSH operation completed

I don't see documentation to say what the default values are. From what I can tell cics.xml and .policy are uploaded and tagged as ISO8859-1 which is good, but a .war file is too which is bad. The defaults could be updated to include all types typically included in a CICS bundle, and default others to binary. It may be helpful to clarify in the bundle directory to say in the bundle root directory.

pcoop commented 5 years ago

I've got a pull request raised to change the message.

If you can paste in what you want the new defaults to be then I'm happy to change them; as the message says, it's just a default, there's no attempt to address every scenario imaginable. The documentation for the defaults is, under normal circumstances, the file itself; you might recall asking for those comments yourself.

Just a thought: if you were to run 'generate bundle' with a basic CICS policy bundle, would that cause a basic .zosattributes file to be created in the project? If it doesn't, would you like it to do so?

markcocker commented 5 years ago

Verified message has been updated:

WARNING: No .zosattributes file found in the bundle directory, default values will be applied.
Regions in scope 'CICPY00V' of CICSplex 'ZOSPTINT':
   Applid: CICPY00V   jobname: CICPY00V   jobid: STC47025   sysname: MV2C    
PUSH operation completed
markcocker commented 5 years ago

Just a thought: if you were to run 'generate bundle' with a basic CICS policy bundle, would that cause a basic .zosattributes file to be created in the project? If it doesn't, would you like it to do so?

No it doesn't at the moment:

ls
mySystemRules.policy
cockerma@marks-mbp:~/test/cics-policy-samples/bundles/CICSDEV_system_rule$ zowe cics-deploy generate bundle
    create : META-INF
    create : META-INF/cics.xml
Anonymous CICS Bundle generated

I think it would make sense for generate bundle to always create a .zosattributes file as it will be needed in most cases.

markcocker commented 5 years ago

Verified.


$ zowe cics-deploy generate bundle
    create : .zosattributes
    create : META-INF
    create : META-INF/cics.xml
Anonymous CICS Bundle generated

ls -lRA
total 8
-rw-r--r--  1 cockerma  staff  586 19 Jun 11:25 .zosattributes
drwxr-xr-x  3 cockerma  staff   96 19 Jun 11:25 META-INF

./META-INF:
total 8
-rw-r--r--  1 cockerma  staff  108 19 Jun 11:25 cics.xml

$ cat .zosattributes
#z/OS File Attributes Document
#-----------------------------
# This document specfies the encodings for the files within
# the project in a form that is compatible with the
# 'Zowe files upload dir-to-uss' command.
#
# Don't upload node_modules
node_modules -
# Don't upload things that start with dots
.* -

# Upload the following file types in binary
*.jpg binary binary
*.png binary binary
*.gif binary binary
*.zip binary binary
*.eot binary binary
*.svg binary binary
*.ttf binary binary
*.woff binary binary

# Convert CICS Node.js profiles to EBCDIC
*.profile ISO8859-1 IBM-1047cockerma@marks-mbp:~/test/test$```

@pcoop Unrelated to this issue, I noticed the .zosattributes file does not end with a new line character which seems to be good practice - https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline and "specfies" is misspelt. I'll close this issue and let you decide if they warrant changing.