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:

45 questions
0
votes
2 answers

How to run a command that submit a JOB to QBATCH then get JOB number for later use in CL PGM

I try to create a command that submit a JOB to QBATCH, after that I want to get the returned JOB number for next command I try RTVJOBA but it's not right RTVJOBA retrieve my current USER JOB while the submitted command has different job…
0
votes
2 answers

CLLE SNDRCVF command not allowed

I am trying to compile this piece of CL code using Rational Series but keep getting error. This is my CL code: PGM DCLF FILE(LAB4DF) SNDRCVF RCDFMT(RECORD1) /* send, recieve file */ DOWHILE (&IN03…
yparam98
  • 15
  • 1
  • 5
0
votes
1 answer

In CL programming, How to read last record of physical file member

I want to read last record of physical file member.
ashwini
  • 11
0
votes
2 answers

Any way to know which operating system the client is connected from?

I am calling STRPCCMD command and passing it some parameters. The command needs to work on linux and windows boxes. Any way to find out which machine the user is connected from in order to build a proper command? Currently I am issuing both and…
Ruslan
  • 1,919
  • 21
  • 42
0
votes
2 answers

Mail database file as excel from AS400

I am looking for a way to attach a database file as an excel sheet in a mail and send it out from an IBM i server. Please advise if there is any way to do this using only native iseries commands. Our company restricts the use of open source tools…
0
votes
1 answer

Last Occurrence of a character in a String in a CL

I have a requirement to find the last occurrence of a character in a string in CL. For Example, If I have a string as Test_01_abc.Txt , and I have to get the last occurrence of '_'(Underscore), I need to get answer as 8(Which is the position of the…
AS400 User
  • 187
  • 2
  • 14
0
votes
2 answers

How can I call a program 100 times in a CL?

I want to call a program in a CL for 100 times to measure up the call times with different program settings. Maybe something like this? DOFOR VAR(&INT) FROM(0) TO(99) CALL PGM(TProg) PARM(&Parm) ENDDO
nicowi
  • 470
  • 2
  • 4
  • 15
0
votes
1 answer

How do you email to a userlist in CL?

Like the name implies. I need to modify a variety of programs to email reports to userlists where they are hardcoded to send to certain users, a large amount are clles. Basically, what is the syntax for userlist functionality in cl?
Chuckles
  • 21
  • 2
0
votes
2 answers

Good resources for secure coding in RPG and CL (iSeries development)

I'm just wondering if anyone can point me for secure coding resources for RPG and CL. (RPG as in for the iSeries, not Role Playing Games). I have no problem finding resources that cover secure coding guidelines that are generic, which are very…
David
  • 72,686
  • 18
  • 132
  • 173
0
votes
2 answers

Passing packed numeric field when calling RPGLE from CLLE?

Should I pass packed numeric fields when calling RPGLE from CLLE? Or convert them to character pass them and convert them back to numeric in the RPG. If the former is recommended, how is this done?
mike
  • 1,233
  • 1
  • 15
  • 36
0
votes
1 answer

ISERIES OS/400 error checking

can some help me find any errors in this PGM. It doesnt compile for me PGM DCL VAR(&LIB) TYPE(*CHAR) LEN(10) VALUE('A2LIB14') DCL VAR(&MSG) TYPE(*CHAR)…
0
votes
1 answer

How to handle TYPE(*PNAME) in command source definition

How to make a TYPE(*PNAME) parameter be: Required Have a Default value Have an initial length of 10 How to handle increases in the length of the prompted field, The length of a prompted field of the type *PNAME can be increased with "&". RPGLE…
Christoff Erasmus
  • 925
  • 1
  • 10
  • 26
0
votes
2 answers

Program in CL (IBM i series) that retires library objects?

I have four libraries where each has a different selection of a set of programs. Unfortunately i cannot delete the unused programs in the library with SQL, since i need to retire them (so they don't stay on our clients servers). Is there a way to…
TheMineral
  • 63
  • 7
0
votes
2 answers

Deleting and updating on different LPARs

Is it possible to compute a file member removal in a rpgle program from a development lpar. eg: RMVM FILE(LIB/FILE1) MBR(PAR1981181) and performing updates on a different file in a different lpar altogether? UPDATE "SCDTA.CORP"/AR#RMTPRL9 SET…
learning_fly
  • 382
  • 1
  • 2
  • 11
-1
votes
1 answer

Running a batch File in AS400

Is there a way to run a batch file on my local as400 server from as400 command line as this batch file exists at a shared folder exists on my local as400 server. batch file: cd C:\D1 for /R %%f in (*.xml) do ( echo "%%f" …
Esra
  • 1
  • 1
1 2
3