Questions tagged [qshell]

6 questions
2
votes
1 answer

Sending IFS File to Outq Prints Line of "@" Symbols

I am attempting to send a file from IFS to an outq on our AS/400 system. Whenever I do, I get exactly what I send, as well as a line of "@" symbols of varying lengths appended to the end. Here's the command I'm using: qsh cmd('cat -c /path/test.txt…
1
vote
1 answer

Read back output from command using QCMDEXC in COBOL iSeries AS/400

I am using QCMDEXC in COBOL to execute a QShell command like this: 01 PROGRAM-VARIABLES. 05 CL-CMD PIC X(33) VALUE "STRQSH CMD('LS')". 05 PACK-VAL PIC 9(10)V9(5) COMP-3 …
Sfp
  • 539
  • 4
  • 15
0
votes
2 answers

REST webervice running a QSHELL script

I have a REST web service running an RPG program, as I need to encrypt some data using Openssl I have built a shell script that receives the data via ENV vars and sends out the data in data areas. Rest_RPG calls a CLP that runs the qsh script, and…
0
votes
1 answer

ls | wc -l inside if statement not working

I am new in qshell and would like to ask for assistance. I am trying to get the file count inside an IFS directory using below qshell command. if(ls <> | wc -l) -gt 0; then echo correct; …
user3490590
  • 17
  • 2
  • 9
0
votes
1 answer

Representing bytes in QShell AS/400 (iSeries)

I am having problems using unix tools that I usually use because I cannot use some characters in QSHell. For example, in linux, I can replace specific bytes on a file like this: sed 's/l/\x81/' a.txt In that case, I am replacing 'l' by the byte x81.…
Sfp
  • 539
  • 4
  • 15
0
votes
1 answer

PHP CLI - Command Ended with Exit Status 2 Troubleshooting

I am trying to run some PHP code from Qshell on an AS/400, and it keeps giving me the following error message: Command ended normally with exit status 2. This has been difficult to test, because it's a dummy user that's running it automatically, and…