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
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
  • 63
  • 3
  • 8
2
votes
1 answer

Subroutine to Display the QMODEL Serial in CLLE

I need to make a CLLE program in IBM RDi that will allow the user to enter options 1 to 7 which will call a subroutine to be run. I can't figure out how to have the System Serial/Model Number displayed when they enter 5. This is the code I have so…
joshcunningsworth
  • 197
  • 1
  • 1
  • 9
2
votes
3 answers

Type of a passed parameter in a CL CALL statement

On my iSeries running i/OS 6.1, I have a CL program that I'm cleaning up a bit. In this program there is a bunch of Cut-and-paste code of the form: IF COND(&ENV='PRD') THEN(DO) CALL JCHKSTS PARM(&RS '127.0.0.1' '6500') /* more junk here…
Hellion
  • 1,740
  • 28
  • 36
2
votes
3 answers

Stack implementation in CL program (OS400/iSeries)

i am starting programming using CL on IBM system i. My task is to implement RPN calculator using CL language. Typically, this calculator uses stack. But I have no idea have to implement it in CL. Can someone give me some advice? Maybe *PTR variables…
2
votes
1 answer

Incrementing a text field in CL

I have to change a CL program on an iSeries computer. The original CL has a variable called &SEQ. It is a text field with a value of '001'. Is there a way possible in CL to add one to the value to make it '002'? I'm not familiar with CL…
Kevin
  • 4,798
  • 19
  • 73
  • 120
2
votes
3 answers

send mail with SNDDST

I'm trying to send out an email from my as400 unsuccessfully! I'm using this code into a CLLE: SNDDST TYPE(*LMSG) TOINTNET((*NONE) + ('address1@mail.it') + ('address2@mail.it')) DSTD('TEST') + LONGMSG('test mail...') I…
jack.cap.rooney
  • 1,306
  • 3
  • 21
  • 37
1
vote
1 answer

IBM i RPG programs are referencing the wrong library after calling them using a JT400 connection pool

I have a Java application that calls CL programs, which then run several RPG programs on an IBM i system, using the JT400 library. At first, i opened a new connection each time, like this and closed it when done: new AS400(hostname, username,…
1
vote
1 answer

How to check if variable is blank in CL?

I have this piece of code. IF COND(%TRIM(&BLANK_VAR) *EQ '') THEN(DO) CALL PGM(MY_PROGRAM) PARM(&BLANK_VAR) ENDDO I would like to check if &BLANK_VAR is an empty string. However my program won't compile because of error…
Ruslan
  • 1,919
  • 21
  • 42
1
vote
0 answers

CPYTOPCD command in CLP copies the DB2 file (containing XML) successfully but file does not show in QDLS subfolders

I have a batch job which invokes CLP and uses CPYTOPCD command to copy a DB2 File which contains XML data. In CLP's job log, it says file is successfully copied but when I checked the QDLS subfolder...QDLS/XXXXXX/XXXXX/ERR/ , the file does not show…
S_T
  • 51
  • 3
  • 10
1
vote
1 answer

Running a COBOL program in AS400

We're trying to migrate our application from Mainframe to AS400. We have sent our COBOL program to AS400 and compiled it in AS400 successfully after a lot of struggle as none of my team mates have experience in AS400. We're now stuck with running…
Praveen
  • 113
  • 1
  • 13
1
vote
2 answers

How do you retrieve the IFS file name from within a RPGLE program?

In the CL program, I am overriding my print file to a folder on the IFS; however, I am not specifying the file name, just that it will be a PDF file. Thus when the PDF is created the system will assign it a unique file name. In the RPGLE program, I…
Tom
  • 11
  • 3
1
vote
2 answers

AS/400 IFS authorities issue

I got some headache managing AS/400 IFS authorities. The IFS files were created using CLE or ILE-COBOL via call to CPYTOIMPF. By default, permission setting under IFS will be 700. Problem is the ID (A) I used to create the file and the one who use…
1
vote
0 answers

How comes QRYSLT option in OPNQRYF empty during execution when it has been defined in the program?

I am trying to use OPNQRYF in a CL program to select some records from a given file. The query selection string is defined in the OPNQRYF statement. But during execution, message CPF9899 was thrown with the cause that QRYSLT is empty. I had…
God_of_Thunder
  • 753
  • 3
  • 20
  • 46
1
vote
1 answer

Is it possible to convert hex format character back to decimal in a CL program?

I have a RPG program A and a CL program B. A calls B with a data structure as entry parameter. This data structure contains characters as well as packed decimals. The entry parameter in B is declared as a character variable, so when the entry…
God_of_Thunder
  • 753
  • 3
  • 20
  • 46
0
votes
1 answer

How can I specify which email address variables should not be processed by SNDSMTPEMM command?

Does anybody know how to tell SNDSMTPEMM that a email recipient address variable should not be processed? This can be done with the attachments by specifying "*NONE" but neither "*N" nor "*NONE" or blanks work on the email addresses. I have created…