How i can display or print my CL commands

235 pts.
Tags:
AS/400
AS/400 printing
CL
CL Commands
CL Program
IBM iSeries
I everybody, i need print or display all commands that i have inside in my CL programs sources in QCLSRC? it is possible and how? thanks everybody.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Have you the PDM ?
If yes
you can use the standard approach:
just use the “6″ option on the SRC member
(if you want to automaticaally repeat the 6 option
just set 6 on first member and press F13)

Other approach is transfer the file in ascii format on PC
and then print

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • hafwhit
    If you have PDM then you can use option 25 on the source member and then use F13 to populate all the option with 25 and press enter. This will you and option to search for a text string. You will have an option to print the list and also and option to print the records in the member as well. You should key “*NONE” for the “Option” entry if you do not want to do anything else with the member. You can also use the FNDSTRPDM command to do the search as well. This is an example:
    FNDSTRPDM STRING('STRSBS')  FILE(QGPL/QCLSRC)  MBR(*ALL) 
    OPTION(*NONE) PRTMBRLIST(*YES) PRTRCDS(*ALL) 
    1,145 pointsBadges:
    report
  • Gilly400
    Hi, I think one of your problems is that almost every line of CL is a command (unless it's blank or a comment). Even DCL, DCLF, PGM, etc are all commands, so you'll end up with a complete listing of your CL. What are you trying to achieve? Can you give us some more details? Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • BUG68
    Hi Gilly400, let try an example: in this CL source i have this PGM PARM(&WAP &WAAPLI &$DTPCO) DCL VAR(&WAAPLI) TYPE(*CHAR) LEN(2) DCL VAR(&WAP) TYPE(*CHAR) LEN(256) DCL VAR(&$DTPCO) TYPE(*DEC) LEN(8 0) /* Overrides * OVRDBF FILE(CCCOES) OVRSCOPE(*CALLLVL) SHARE(*YE /* Open query file * OPNQRYF FILE((CCCOES *FIRST RCOES)) QRYSLT(&WAP) KEYFLD((OXDATA) (OXNOPR) (OXNORD)) + OPNSCOPE(*ACTGRP) /* Call Program * CALL PGM(CC3006) PARM(&$DTPCO &WAAPLI) /* CLOSE files * CLOF OPNID(CCCOES) RCLRSC what i pretend is, printing or see in all my libraries all sources that contain command types like OPNQRYF, OVRDBF, ETC. like a summary. i know this solution FNDSTRPDM, but with this i need made one by one (word or command), and is a big task. i know another one solution like PRTCMDUSG but i need know all command and word that CL programming are permitted. what i am pretend is like a global solution like *CMD, you know what i mean. Regards
    235 pointsBadges:
    report
  • Gilly400
    Hi, What sort of output do you want to get ? CommandName1 - CLSource1 CommandName1 - CLSource2 ComamndName2 - CLSource2 or CLSource1 - CommandName1 CLSource2 - CommandName1 CLSource2 - CommandName2 or CommandName1 - Number of times used CommandName2 - Number of times used or CLSource1 - Number of commands CLSource2 - Number of commands or something else? I think whatever you want is going to take a bit of programming work to achieve. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • BUG68
    Hi the first type of sort is enough. i don't mind if i need programming this solution. Regards
    235 pointsBadges:
    report
  • Gilly400
    Hi, I would suggest something like the following :- 1. Get a file containing a list of the commands you need/want to look for. You could use DSPOBJD with object type of *CMD to an outfile to get a starting point and then remove the commands you don't want to check (PGM, ENDPGM, etc.). Bear in mind that there are a lot of commands available in the OS and that you may have defined your own commands. 2. Create a program that reads your CL sources and checks each line to see whether it contains an entry from the file with the list of commands. If it contains one of these commands, then write a record to a summary file (which contains command name and CL source details - library, file, member). This should give you a file with a sort of cross-reference of commands and CL source. Then you can write a report program or use Query to get a report in whatever format you want. Hope this helps. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following