Re: Line comments in DFSORT
I found this in the ICETOOL doc: | Continuation can be indicated by a hyphen (-) after the operator or after any operand. The next operand must then be specified on the next line. For example: | SORT FROM(INDD) - |USING(ABCD) - |TO(OUTPUT1,OUTPUT2,OUTPUT3) | | Any characters specified after the hyphen are ignored. Which shows me that line comments are a byproduct of the ICETOOL continuation logic, and not a core feature. From your earlier example, I thought that the # character had some significance, but now I see that it does not. None of the examples in the doc show line comments being used. I use the traditional "* in column 1" comment to show "Here is what is coming up in the next several lines of code", usually with a blank line in front, so that the eye can scan to each block of statements quickly. I use line comments to explain the gory details of the code immediately to the left of it. This is the style I learned as an Assembler programmer, and it carries forward to my work in many other languages. DFSORT and ICETOOL code can be very complex, and is daunting for a new student, looking at it for the first time. While teaching, we seek to have a stream of "Aha, I get what it is doing!" moments. Line comments help us to explain those gory details that lead to the "Light Bulb" moment. The best thing about the DFSORT documentation is that there are numerous examples of different scenarios, with the code to handle that scenario. Other IBM products would do well to follow this approach. Regards, Bob Stark -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Line comments in DFSORT
You wrote: I had the remarks/comments after the Continuation character (-). Sure enough, when I did that, it worked. It's unusual, having to add an un-necessary line split just to add a comment. I was expecting it to work more like IDCAMS, TSO or JCL. I searched for every # in the the DFSORT Application Programming Guide to verify that ICETOOL line comments are not documented. Thanks again for your help figuring this out. I'm updating our DFSORT and ICETOOL training course materials. The examples will be more readable now! Regards, Bob Stark -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Line comments in DFSORT
That is good news, but I cannot seem to replicate your results ICE281I 0 ORIGINAL OPERATOR STATEMENTS FOLLOW * Enter ICETOOL operators here * COPY FROM(INPUTA) TO(OUTA) # COPY INPUTA TO OUTA COPY FROM(INPUT1) USING(ALAS) TO(OUTB) # COPY INPUT1 TO OUTB SORT FROM(INPUTX) USING(ALAK) TO(OUTC) # COPY INPUTX TO OUTC ICE282I 1 PERFORMING SYMBOL SUBSTITUTION AS NEEDED ICE630I 0 MODE IN EFFECT: STOP COPY FROM(INPUTA) TO(OUTA) # COPY INPUTA TO OUTA $ ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER ICE602I 0 OPERATION RETURN CODE: 12 ICE630I 2 MODE IN EFFECT: SCAN COPY FROM(INPUT1) USING(ALAS) TO(OUTB) # COPY INPUT1 TO OUTB $ ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER SORT FROM(INPUTX) USING(ALAK) TO(OUTC) # COPY INPUTX TO OUTC $ ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER Regards, Bob Stark -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Line comments in DFSORT
Thanks. That online doc is tricky, I read the detail page which didn't mention "Remarks". The higher level page that you shared did mention them. I experimented with our legacy system, and it supported them too (but was missing other features like OUTREC). Alas, ICETOOL does not support the same kind of comments. Regards, Bob Stark -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Line comments in DFSORT
I just did an experiment in DFSORT with JCL-style line comments after INCLUDE, SORT, and OUTREC, and they work! The DFSORT doc says that comments are only supported when entered with * on column 1. When was this implemented, and why isn’t this documented? Do you think it is safe to rely on? I sent this question to dfs...@us.ibm.com but it bounced right back, perhaps there are DFSORT developers here. Regards, Bob Stark //STEP1EXEC PGM=SORT //SYSIN DD * INCLUDE COND=(9,1,CH,EQ,C'3',|, PART NUMBERS ENDING IN 3 9,1,CH,EQ,C'5',|, PART NUMBERS ENDING IN 5 9,1,CH,EQ,C'7') PART NUMBERS ENDING IN 7 SORT FIELDS=(10,30,CH,A)SORT ASCENDING BY DESCRIPTION OUTREC BUILD=(2X,10,30,3X,1,9,3X,68,10) DESCRIPTION, PARTNO, CATEGORY //SYSOUTDD SYSOUT=* //SORTOUT DD SYSOUT=* //SORTINDD DISP=SHR,DSN=&HL..TR.INPUTA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN