×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I have now get the string with file name created in IFS.
But the file name have some strangers hex char in the start
of varible MyFile. ??
Here is my sample exit program. What can I do to remove
the starting hex char. ex. x'0028' it look like it has
some form off lengt of the variable.
Is this normal when setting variable VARYING.
I can se this in the CL program that i Call.
************************************************************
* Program : NETPPE Net Post processing Exit Submit Job. *
* This program will start when a file is recieved *
* in IFS file share. *
* CL program NETPPECL is Called when file match *
* NETPPE Exit point registered to QIBM_QPWFS_FILE_SERV *
************************************************************
FNETPPEDB IF E DISK
* CL program for Submit job
D NETPPECL PR ExtPgm('NETPPECL')
D CSBMPGM 10A
D CSBMLIB 10A
D CJOBDFILE 10A
D CJOBDLIB 10A
D CJOBQ 10A
D CJOBQLIB 10A
D CSBMUSER 10A
D CFILE 254A VARYING
* Prodecure to send message
D QMHSNDM PR ExtPgm('QMHSNDM')
D MsgID 7A const
D QualMsgF 20A const
D MsgTxt 32767A const options(*varsize)
D MsgTxtLen 10I 0 const
D MsgType 10A const
D MsgQueues 20A const dim(50) options(*varsize)
D NumQueues 10I 0 const
D RpyQueue 20A const
D MsgKey 4A
D errcode * const
D messageid s 7a INZ('CPF9898')
D msgfilnm s 20a INZ('QCPFMSG *LIBL ')
D messagekey s 4a INZ(' ')
D msgq s 20a INZ('QSYSOPR *LIBL ')
D rply s 20a INZ('QSYSOPR *LIBL ')
D msg s 256a VARYING
D PWFS0100 ds qualified
D User_Profile 10a
D Server_Id 10a
D Function_ID 10u 0
D Format_Name 8a
D RD_Open 1a
D WR_Open 1a
D RD_WR_Open 1a
D Delete_Allow 1a
D Filename_Len 10u 0
D Filename 16383c CCSID(1200)
D MyFile S 254a varying inz(*blanks)
D ChkFileLen S 10I 0
D HexNullPos S 10I 0
* Parameter for NETAUTO
Dprm PR extpgm('NETPPE')
D RTNCD 1A
D PCSDTA 9999A
Dprm PI
D RTNCD 1A
D PCSDTA 9999A
/Free
RTNCD = '1';
PWFS0100 = PCSDTA;
// Check for Server id *FILESRV
If PWFS0100.Server_Id = '*FILESRV ';
// Check for Create New File
If PWFS0100.Function_ID = X'00000001';
ChkFileLen = PWFS0100.Filename_Len / 2;
MyFile = %subst( PWFS0100.Filename
: 1
: ChkFileLen );
DSPLY %Char(ChkFileLen) 'QSYSOPR';
// Send message to QHST
msg = 'NETPPE: File Recieved in IFS : ' + %Trim(MyFile);
CALLP QMHSNDM( messageid : msgfilnm : msg : %len(msg)
: '*INFO' : msgq : 1 : rply : messagekey : *null );
// Read all files to check for
Read NETPPEDB;
DoU %eof(NETPPEDB);
ChkFileLen = %len(%trim(CHKFILE));
If %subst(MyFile : 1 : ChkFileLen) = CHKFILE;
// Check NET user.
If PWFS0100.User_Profile = CHKUSER;
// File found and User math then Submit job
CALLP NETPPECL(SBMPGM : SBMLIB : JOBDFILE :
JOBDLIB : JOBQ : JOBQLIB : SBMUSER : MyFile);
EndIf; // User_Profile
EndIf; // Check File
Read NETPPEDB;
EndDo;
EndIf; // Create File
EndIf; // Server Id
*InLr = *on;
/End-Free
Best Regards
Poul
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.