Thanks dick and enrico,
i have started doing coding for the REXX program.
can you please let me know the logic of capturing only the job name by REXX. I have started with the code which reads the file and count each line and display the content-
"ALLOC F(INFILE) DSN('SKUMA4.JOBDET.TEST') SHR REU"
/* INFILE is a logical name for the file */
"EXECIO * DISKR INFILE ( FINIS STEM MYFILE."
/* MYFILE is the stem (array) that holds the data */
I = 1
/* MYFILE.0 will have the number of */
/* elements in the stem */
DO WHILE I <= MYFILE.0
SAY ' LINE ' I ' : ' MYFILE.I
I = I + 1
Here i have to add the logic that when it is reading records one by one and if it finds the keyword- "MSGCLASS=" and the key word "JOB" then i have to capture that jobname just after //
//ABCDEFGH JOB .....................MSGCLASS=X,CLASS=
here "MSGCLASS=" is there so i have to capture ABCDEFGH.
Please let me know how to implement this logic with sample code.