We are in the testing phase of upgrading from version 10 to version 12.1. We have a script that has worked in version 10 for years but doesn't want to seem to work in version 12. I think there is either something that has slightly changed with a function or a spacing issue. Can anyone see a function in this script that may have changed in the version upgrade process? There is a setup script previous to this one and I think it is working so I am just adding this script. I didn't write this but I believe it is suppose to create a vara in the "No Folder" and then populating it with filenames. The vara is being created but it is not being populate with file names. I have read issues with PREP_PROCESS, but I believe they were supposed to be resolved in version 12.1. Thanks
This is in the Process tab.
: READ &FILENAME# ,,
This is in the Post Process tab.
: SET &VARA_NAME# = "VARA.FILES.INF_IN"
: SET &SIZE_VARA# = 0
: SET &COUNTER# = 0
! Grab the highest line num in vara to determine the size of the vara
: SET &HND_CHECKVARA# = PREP_PROCESS_VAR (&VARA_NAME#)
: PROCESS &HND_CHECKVARA#
: SET &SIZE_VARA# = ADD(&SIZE_VARA#, 1)
: ENDPROCESS
: CLOSE_PROCESS &HND_CHECKVARA#
! Initialize the counter, or increment if != 0
! : IF &SIZE_VARA# = 0
: SET &COUNTER# = '0000000000000001'
! : ELSE
! : SET &COUNTER# = ADD(&SIZE_VARA#,1)
! : ENDIF
: SET &CUR_DATE# = SYS_DATE_PHYSICAL ( 'YYYYMMDD')
: SET &CUR_TIME# = SYS_TIME_PHYSICAL ( 'HHMMSS')
: SET &SIZE_VARA# = FORMAT(&SIZE_VARA#)
: PRINT "Number of lines in &VARA_NAME#: &SIZE_VARA#"
! Get filename from this report and put into VARA object for other uses
: SET &REPORT_HANDLE# = PREP_PROCESS_REPORT("JOBF",,"REP","*U0011125*")
: PROCESS &REPORT_HANDLE#
: SET &LINE# = GET_PROCESS_LINE(&REPORT_HANDLE#)
: SET &START# = STR_FIND(&LINE#,"'")
: SET &START# = ADD(&START#,1)
: SET &END# = STR_FIND(&LINE#,"'",&START#)
: SET &LNG# = SUB(&END#,&START#)
: SET &FILENAME# = STR_CUT(&LINE#,&START#,&LNG#)
! : PRINT "Index and filename added to VARA: &COUNTER# &FILENAME#"
! : PUT_VAR "&VARA_NAME#",&COUNTER#, &FILENAME#
: PUT_VAR "&VARA_NAME#","D&CUR_DATE#_T&CUR_TIME#-&COUNTER#", "&FILENAME#"
: PRINT "Index and filename added to VARA: D&CUR_DATE#_T&CUR_TIME#-&COUNTER# &FILENAME#"
: SET &COUNTER# = ADD(&COUNTER#,1)
: ENDPROCESS
!: CLOSE_PROCESS &REPORT_HANDLE#