Questions tagged [control-language]

Control language is an IBM i (formerly AS/400) programming language that talks directly to the server's operating system (OS/400).

Related programming languages include:

42 questions
10
votes
7 answers

Calling a Web Service from COBOL or CL

I'm using AS400 and I have been asked to call a web service from the green screen. How can thisbe this achieved? Any sample COBOL or CL code would be very helpful.
Anton Baclao
  • 101
  • 1
  • 3
5
votes
1 answer

Create iSeries command that accepts an object name as a parameter

I'm trying to create a new command on an iSeries, where one of the parameter has to be a file name using the standard LIBRARY/FILE MEMBER syntax, something like MYCMD FILE(MYLIB/MYFILE MYMEMBER) or even MYCMD FILE(MYLIB/MYFILE) MEMBER(MYMEMBER) I…
T. Fabre
  • 1,484
  • 14
  • 20
4
votes
2 answers

Syntax higlighters for RPG And CLP that generate HTML and/or RTF?

I found that ToHtml.com has a nice bunch of syntax highlightes that generate HTML. But they don't include RPG or CLP. So: anyone who knows a syntax highlighter for RPG or/and CLP that generates either HTML or RTF? Some more references the custom…
4
votes
5 answers

iSeries Export to CSV

Is there an iSeries command to export the data in a table to CSV format? I know about the Windows utilities, but since this needs to be run automatically I need to run this from a CL program.
nearly_lunchtime
  • 11,227
  • 15
  • 35
  • 42
3
votes
2 answers

How to reset file pointer in a CL program?

I am currently working on a CL program which needs to read some records from a file. The file is overridden to itself for one of its members. Then there are some RCVF operations to retrieve the records of that particular member. When the end of file…
God_of_Thunder
  • 703
  • 3
  • 15
  • 44
3
votes
4 answers

iSeries - Call SQL stored procedure from CL program

How can I run a stored procedure from a CL program? RUNSQLSTM requires a source member, but I just want to build a command so users can pass in variables easily, so this won't work.
main_menu
3
votes
4 answers

Trimming variable in CLLE

How can you trim a variable in CLLE??
user278576
3
votes
3 answers

Calling write() C API from CL on iSeries

I'm trying to write a program in Control Language which creates and populates a configuration file in the IFS prior to calling a Java utility which uses it. I've succeeded in calling the open() and close() APIs to (re)create the file but for the…
zkarj
  • 617
  • 9
  • 18
2
votes
1 answer

How do you display SQL Select output from CL?

I am trying to replace an old CL program that issues RUNQRY command. I can run the SQL statement from STRSQL and it will yield the same output as the query. I tried RUNSQL and RUNSQLSTM but neither support just doing a SELECT Is there a command to…
Ruslan
  • 1,670
  • 16
  • 36
2
votes
2 answers

Is there an equivalent to the iSeries OVRDBF command in SQL?

I have a requirement in a SQL environment that under specific circumstances, all references to table (or view) A in a procedure actually use table (or view) B. On the iSeries I would have used the OVRDBF command to override references to table A…
JBell6
  • 101
  • 1
  • 6
2
votes
3 answers

How do CL commands build their exact parameter lists?

I have a CMD command object that drives an RPGLE program. Because the command may be called with several different parameters, some of which are mutually exclusive, I parse the parameter passed by using a data structure in the RPGLE so I can handle…
Mike
  • 1,032
  • 7
  • 20
2
votes
2 answers

What specifies semi colon as statement separators on CRTQMQRY and STRQMQRY commands

When running multiline SQL code with semi colon as sql statement separators the following errors: CRTQMQRY QMQRY(MYPGMLIB/MYSQL) SRCFILE(MYLIB/QSQLSRC) STRQMQRY QMQRY(MYPGMLIB/MYSQL) Whereas the following works: RUNSQLSTM SRCFILE(MYPGMLIB/QSQLSRC)…
mike
  • 1,279
  • 1
  • 13
  • 32
2
votes
2 answers

CL: Path name contains embedded nulls (CPD018A)

I am trying to write a simple CL program to take a file name parameter and run the SQL in the file with COMMIT(*CHG) and DBGVIEW(*SOURCE). I am getting CPD018A: Path name contains embedded nulls: Cause . . . . . : Path name…
Sarah Kemp
  • 2,640
  • 3
  • 18
  • 28
2
votes
4 answers

CPYTOPCD only copies a fraction of the information when used from within my program, yet it copies all the information when used from the command line

I am rather new to the whole IBM i (as400), rpgle scene. I was given the task to export some information into XML format. I was able to make the output of the information correct, the problem arose when I used CPYTOPCD to copy the information to the…
RaptorSD
  • 33
  • 4
2
votes
3 answers

Decimal To Character Conversion On AS/400

In a CL, I am trying to convert a number (193) to its alpha representation (A). Coming up with nothing, need a little help. Is there a CHAR function?
selpatS20
  • 55
  • 2
  • 8
1
2 3