IBM Support

An ILE CL Program Fails with CPF2479 on a SNDF Command

Troubleshooting


Problem

This document explains why an ILE CL program fails with message CPF2479 on a SNDF command and how it should be coded.

Resolving The Problem

The message CPF2479 is a correct message for the following ILE CL program:

PGM
DCLF FILE(SENDFILEA)
SNDF DEV(*FILE) RCDFMT(MSGCTL1)
ENDPGM

The source for the SENDFILEA display file:

A R RECORDA
A CF03(03 'END OF JOB')
A CF07(07 'UK TRAIFF INTERSTAT RPT WI-
A TH GB')
A 21 ALARM
A OVERLAY
A PRINT
A PNAME 10A O 1 3
A CONAME 40A O 1 21COLOR(WHT)
A 1 70SYSNAME
A WSID 10A O 2 3
A 2 70DATE
A EDTCDE(Y)
A 3 3USER
A 3 70TIME
A 4 3'-----------------------------------
A ------------------------------------
A -------'
A 9 18'ENTER SELECTION CRITERIA FOR REPOR-
A T:'
A 12 23'MMDDYY'
A DSPATR(RI)
A COLOR(WHT)
A 12 31'FROM DATE :'
A FRDATE 6A B 12 49
A 22 3'F3=EXIT F7=PRINT RPT'
A COLOR(BLU)
A 23 3'-----------------------------------
A ------------------------------------
A ------ '
A 23 1' '
A 2 23'SELECTION PARAMETER FOR QUERY REPO-
A RT'
A 13 31'TO DATE :'
A 13 23'MMDDYY'
A DSPATR(HI)
A DSPATR(RI)
A TODATE 6 B 13 49
A R MSGRCD SFL
A TEXT('MSG SFL RECORD')
A SFLMSGRCD(24)
A MSGKEY SFLMSGKEY
A PGMSGQ SFLPGMQ(10)
A R MSGCTL1 SFLCTL(MSGRCD)
A TEXT('MSG SFL CONTROL')
A SFLDSP
A SFLDSPCTL
A SFLINZ
A N98 SFLEND
A SFLSIZ(0010)
A SFLPAG(0001)
A PGMSGQ SFLPGMQ(10)
A FLD 10 0I 5 34

This message is received because the SNDF command does not know the name of the message queue for the program. If you are using an ILE CL program to put up a SFLMSG record, then you must supply the program message queue to the SFLPGMQ keyword. The following is a sample of a working ILE CL program:

Note: In this example, the program name is CLPGMSGQ.

PGM
DCLF FILE(SENDFILEA)

SNDPGMMSG MSG('TEST') TOPGMQ(*PRV (CLPGMSGQ *NONE +
CLPGMSGQ))
CHGVAR VAR(&PGMSGQ) VALUE('CLPGMSGQ')
SNDF DEV(*FILE) RCDFMT(MSGCTL1)
ENDPGM

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

Historical Number

465436614

Document Information

Modified date:
11 November 2019

UID

nas8N1014070