For others who, like me, are qshell / awk noobs, I copied the script Roman
provided into a (Windows) text file and saved it to my IFS folder. (For
simplicity's sake, I also stored the COBOL copybook text file in the same
folder.) I opened the script in Notepad++ and saved it as a "Unix script
file (*.sh; *.bsh)", thinking that this might get rid of the CR
characters. I tried running the script in qshell as is, but kept getting
syntax errors. Google was *not* my friend for the syntax problem, but I
did find that Notepad++ can automatically convert end-of-line characters.
In Notepad++, I clicked on View / Show Symbol / Show End of Line. Here, I
could see that each line ended with CR/LF. To remove the CR, click Edit /
EOL Conversion / UNIX/OSX Format. Now the script runs like a charm.
In addition to this script not resolving REDEFINEs (per Roman's earlier
note in the thread), it also doesn't resolve OCCURS.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.