Error on Reterive Job number

manotheb

Active Member
Hi ,
i had written the following code to retreive Job number, but i am getting "0" as my job number and loop also dint get process. Kindly tell me what mistake i did. the Code is
===========================================================

0005 Get Audit Information
SL UserID -> BF szUserName
VA rpt_TimeLastUpdated <- BF mnTime
VA rpt_WorkStationId_JOBN <- BF szWorkstation_UserId
0006 CALL( UBE:R56TEST6 , Ver: PLT001 )
0007 VA rpt_rpt_ServerName_SRVR = ""
0008 Fetch UBE Mapping from OCM
<Blank> -> BF szReport
VA rpt_rpt_ServerName_SRVR <- BF szLogicalDataSource
0009 F986110 DS OVERRIDE
VA rpt_rpt_ServerName_SRVR -> BF szDatabasepath
0010 Get Current Environment
VA rpt_szCodePath_SERVER_PATHCD <- BF szEnvironmentname
0011 Get Default Job Queue
VA rpt_JobQueue_JOBQUE <- BF szJobQueue
"R56TEST6" -> BF szReport
"PLT001" -> BF szVersion
SL UserID -> BF szUserId
0012 VA rpt_FoundationFutureUse2_FNDFU = "R55TEST6_PLT001_%"
0013 F986110.Select
VA rpt_JobQueue_JOBQUE = TK Job Queue
VA rpt_szCodePath_SERVER_PATHCD = TK Environment Name
SL UserID = TK User ID
SL DateToday = TK Date - Job Submitted
VA rpt_TimeLastUpdated = TK Time Job Submitted
VA rpt_rpt_ServerName_SRVR = TK Execution Host Name
VA rpt_WorkStationId_JOBN = TK Origination Host Name
SL DateToday = TK Date - Last Task
VA rpt_TimeLastUpdated = TK Time - Last Task
VA rpt_FoundationFutureUse2_FNDFU = TK Foundation - Future Use 2
0014 F986110.Fetch Next
VA rpt_JobstatusOW_JOBSTS <- TK Job Status
VA rpt_ServerJobNumber_JOBNR <- TK Server Job Number
VA rpt_FoundationFutureUse2_FNDFU <- TK Foundation - Future Use 2
0015 While SV File_IO_Status is equal to CO SUCCESS
0016 F986110.Fetch Next
VA rpt_JobstatusOW_JOBSTS <- TK Job Status
VA rpt_ServerJobNumber_JOBNR <- TK Server Job Number
VA rpt_FoundationFutureUse2_FNDFU <- TK Foundation - Future Use 2
0017 End While
0018 F986110 DS OVERRIDE
<Blank> -> BF szDatabasepath
=================================================

kindly check and tell. i am using 8.12. now i am running locally, in future it is going to run in server
 
Hi, The code you have written here will perform the local processing as the BSFN for Data base override (F986110 DS OVERRIDE) is a client only BSFN and it will fetch you an already created job number of some UBE run in the previous time and not the job number of your own UBE.

Code seems to be OK as I too did with the same coding some time back and it fetched me the Job Number locally.

Try doing one change in your F986110. Select, and use like operator instead of=in the statement:

VA rpt_FoundationFutureUse2_FNDFU = TK Foundation - Future Use 2

use this:

VA rpt_ReportName_FNDFUF2 is Like TK Foundation - Future Use 2

To fetch the Job Number of your own current running UBE, you will have to create a Driver UBE that will call your main UBE using the BSFN: B91300C- Launch Batch Application and then the job number of your main UBE will be fetched. you will have to modify you code for server processing and then deploy the change and get the job number.

Try using the Like operator and see if it works.

Thanks.
 
Back
Top