I need help with the following script that pulls data from the mainfram via the web. I do not know how I can pull in two tapes (datasets) at once so the return values shows the dats from both. in example below I want to be able to pull in both the d5 and the k5 data and produce just one report to get it.
value="AACC.D5.DETAIL.JAN03">January 2003</option>
<option value="AACC.K5.DETAIL.JAN03
<HTML>
<HEAD>
<TITLE>Submit xxxxxx xxxxx Report Request</TITLE>
<HTA:APPLICATION ID:"objxxxReport" APPLICATIONNAME="xxxxxReport" SCROLL="no" SINGLEINSTANCE="yes" WINDOWSTATE="normal">
<SCRIPT LANGUAGE="VBScript">
Sub SubJCL
Set objSHL = CreateObject("WScript.Shell"
Set WshSysEnv = objSHL.Environment("PROCESS"
drvpath = WshSysEnv("SystemDrive" & WshSysEnv("HOMEPATH" & "\"
DSN = "xxxxxxx.ITF.OUTPUT.D" & DatePart("yyyy",now) & DatePart("m",now) & DatePart("d",now) & ".T" & DatePart("h",now) & DatePart("m",now) & DatePart("s",now)
If len(document.Info.CC.value) < 1 then
MsgBox "You must enter a valid cost center"
Exit Sub
End If
If len(document.Info.CC.value) < 5 then
MsgBox "The cost center must be 5 digits long"
Exit Sub
End If
If len(document.Info.id.value) < 1 then
MsgBox "You must enter an ID"
Exit Sub
End If
If len(document.Info.psw.value) < 1 then
MsgBox "You must enter a password"
Exit Sub
End If
If len(document.Info.MSGid.value) < 1 then
MsgBox "You must enter an e-mail address"
Exit Sub
End If
fJCL = drvpath & "ftpjcl.txt"
iJCL = "//ITFIN JOB '3,6961,,,X5522,4,SNC ','Sxxxxx',REGION=1024K," & vbCrLf
iJCL = iJCL & "// MSGCLASS=W,NOTIFY=xxxxx,TIME=78" & vbCrLf
iJCL = iJCL & "//*MAIN USER=DACCSAB,CLASS=IMSAP" & vbCrLf
iJCL = iJCL & "//JOBLIB DD DSN=CC.MS.PLIB1,DISP=SHR" & vbCrLf
iJCL = iJCL & "//STEP1 EXEC PGM=B2DET101" & vbCrLf
iJCL = iJCL & "//SYSOUT DD SYSOUT=*" & vbCrLf
iJCL = iJCL & "//SYSUDUMP DD SYSOUT=*" & vbCrLf
iJCL = iJCL & "//DETAIL DD DSN=" & document.info.Mtd.value & ",DISP=SHR" & vbCrLf
iJCL = iJCL & "//REPORT DD DSN=" & DSN & "," & vbCrLf
iJCL = iJCL & "// DISP=(NEW,CATLG,DELETE),UNIT=SPACE," & vbCrLf
iJCL = iJCL & "// SPACE=(TRK,(500,100)),DCB=(LRECL=133,RECFM=FBA,BLKSIZE=27930)," & vbCrLf
iJCL = iJCL & "// RETPD=7" & vbCrLf
iJCL = iJCL & "//DIVCC DD *" & vbCrLf
iJCL = iJCL & document.Info.Div.value & document.Info.CC.value & vbCrLf
iJCL = iJCL & "/*" & vbCrLf
iJCL = iJCL & "//STEP2 EXEC BJMSG" & vbCrLf
iJCL = iJCL & "//SYSIN DD *" & vbCrLf
iJCL = iJCL & "FROM=SHR1,PSW=cop5" & vbCrLf
iJCL = iJCL & "MSG 3 6961 M2I" & vbCrLf
iJCL = iJCL & "To: "& document.info.MSGid.value & vbCrLf
iJCL = iJCL & "Fr: xxxxx" & vbCrLf
iJCL = iJCL & "Re: xxxxx" & vbCrLf & vbCrLf
iJCL = iJCL & "Please view your report request @" & vbCrLf
iJCL = iJCL & """ & DSN & "'""" & vbCrLf
iJCL = iJCL & "You will need to enter your AID and password to view the report." & vbCrLf
iJCL = iJCL & "This report will be deleted in 7 days" & vbCrLf
iJCL = iJCL & "/*" & vbCrLf
iJCL = iJCL & "//"
Set objFSO = CreateObject("Scripting.FileSystemObject"
Set objOTF = objFSO.OpenTextFile(fJCL,2,true)
objOTF.WriteLine(iJCL)
objOTF.Close()
cFTP = drvpath & "ftpcmds.log"
strFTP = "open xxxxx.xxxxx.xx.com" & vbCrLf
strFTP = strFTP & document.Info.id.value & vbCrLf
strFTP = strFTP & document.Info.psw.value & vbCrLf
strFTP = strFTP & "quote site filetype=jes" & vbCrLf
strFTP = strFTP & "put " & """" & fJCL & """" & vbCrLf
strFTP = strFTP & "bye"
Set objOTF = objFSO.OpenTextFile(cFTP,2,true)
objOTF.WriteLine(strFTP)
objOTF.Close()
Set objOTF = Nothing
Set objFSO = Nothing
objSHL.RUN "%COMSPEC% /K ftp -s:""" & cFTP & """ > """& drvpath & """\FTPOUT.LOG",0,False
MsgBox "JOB Submitted"
End Sub
Sub QuitSub
self.Close()
End Sub
</Script>
</Head>
<Body>
<center><h2>Submit a Mainframe Job from the Web</h2></center><hr>
<form name="Info">
Select Division:<select name="Div"><option selected value="0007">0007</option>
<option value="0021">0021</option>
<option value="0950">0950</option>
<option value="ALL">ALL</option>
</select>
Enter Cost Center(ie:06914): <input type="text" name="CC">
Select Date:<select name="Mtd"><option selected value="AACC.D5.DETAIL.JAN03">January 2003</option>
<option value="AACC.K5.DETAIL.JAN03"
ACC.HE.DETAIL.FEB03">February 2003</option>
<option value="AACC.d5.DETAIL.MAR03">March 2003</option>
<option
value="AACC.k5.DETAIL.Mar03">April 2003</option>
<option value="AACC.HE.DETAIL.MAY03">May 2003</option>
<option value="AACC.HE.DETAIL.JUN03">June 2003</option>
<option value="AACC.HE.DETAIL.JUL03">July 2003</option>
<option value="AACC.HE.DETAIL.AUG03">August 2003</option>
<option value="AACC.HE.DETAIL.SEP03">Sep 2003</option>
<option value="AACC.HE.DETAIL.OCT03">October 2003</option>
<option value="AACC.HE.DETAIL.NOV03">November 2003</option>
<option value="AACC.HE.DETAIL.DEC03">December 2003</option>
<option value="AACC.HE.DETAIL.OCT02">October 2002</option>
<option value="AACC.HE.DETAIL.NOV02">November 2002</option>
<option value="AACC.HE.DETAIL.DEC02">December 2002</option>
</select><br>
Enter your ID(ie:xxxxxx): <input type="text" name="id">
Enter your password: <input type="password" name="psw"><br>
Enter an e-mail address: <input type="text" size="45" name="MSGid">Separate multiple e-mail address with a comma<br>
<p>
<Input Type="Button" Name="Submit" Value="Submit" onClick="SubJCL()">
<Input Type="Button" Name="Quit" Value="Quit" onClick="QuitSub()">
</form>
</Body></html>
value="AACC.D5.DETAIL.JAN03">January 2003</option>
<option value="AACC.K5.DETAIL.JAN03
<HTML>
<HEAD>
<TITLE>Submit xxxxxx xxxxx Report Request</TITLE>
<HTA:APPLICATION ID:"objxxxReport" APPLICATIONNAME="xxxxxReport" SCROLL="no" SINGLEINSTANCE="yes" WINDOWSTATE="normal">
<SCRIPT LANGUAGE="VBScript">
Sub SubJCL
Set objSHL = CreateObject("WScript.Shell"
Set WshSysEnv = objSHL.Environment("PROCESS"
drvpath = WshSysEnv("SystemDrive" & WshSysEnv("HOMEPATH" & "\"
DSN = "xxxxxxx.ITF.OUTPUT.D" & DatePart("yyyy",now) & DatePart("m",now) & DatePart("d",now) & ".T" & DatePart("h",now) & DatePart("m",now) & DatePart("s",now)
If len(document.Info.CC.value) < 1 then
MsgBox "You must enter a valid cost center"
Exit Sub
End If
If len(document.Info.CC.value) < 5 then
MsgBox "The cost center must be 5 digits long"
Exit Sub
End If
If len(document.Info.id.value) < 1 then
MsgBox "You must enter an ID"
Exit Sub
End If
If len(document.Info.psw.value) < 1 then
MsgBox "You must enter a password"
Exit Sub
End If
If len(document.Info.MSGid.value) < 1 then
MsgBox "You must enter an e-mail address"
Exit Sub
End If
fJCL = drvpath & "ftpjcl.txt"
iJCL = "//ITFIN JOB '3,6961,,,X5522,4,SNC ','Sxxxxx',REGION=1024K," & vbCrLf
iJCL = iJCL & "// MSGCLASS=W,NOTIFY=xxxxx,TIME=78" & vbCrLf
iJCL = iJCL & "//*MAIN USER=DACCSAB,CLASS=IMSAP" & vbCrLf
iJCL = iJCL & "//JOBLIB DD DSN=CC.MS.PLIB1,DISP=SHR" & vbCrLf
iJCL = iJCL & "//STEP1 EXEC PGM=B2DET101" & vbCrLf
iJCL = iJCL & "//SYSOUT DD SYSOUT=*" & vbCrLf
iJCL = iJCL & "//SYSUDUMP DD SYSOUT=*" & vbCrLf
iJCL = iJCL & "//DETAIL DD DSN=" & document.info.Mtd.value & ",DISP=SHR" & vbCrLf
iJCL = iJCL & "//REPORT DD DSN=" & DSN & "," & vbCrLf
iJCL = iJCL & "// DISP=(NEW,CATLG,DELETE),UNIT=SPACE," & vbCrLf
iJCL = iJCL & "// SPACE=(TRK,(500,100)),DCB=(LRECL=133,RECFM=FBA,BLKSIZE=27930)," & vbCrLf
iJCL = iJCL & "// RETPD=7" & vbCrLf
iJCL = iJCL & "//DIVCC DD *" & vbCrLf
iJCL = iJCL & document.Info.Div.value & document.Info.CC.value & vbCrLf
iJCL = iJCL & "/*" & vbCrLf
iJCL = iJCL & "//STEP2 EXEC BJMSG" & vbCrLf
iJCL = iJCL & "//SYSIN DD *" & vbCrLf
iJCL = iJCL & "FROM=SHR1,PSW=cop5" & vbCrLf
iJCL = iJCL & "MSG 3 6961 M2I" & vbCrLf
iJCL = iJCL & "To: "& document.info.MSGid.value & vbCrLf
iJCL = iJCL & "Fr: xxxxx" & vbCrLf
iJCL = iJCL & "Re: xxxxx" & vbCrLf & vbCrLf
iJCL = iJCL & "Please view your report request @" & vbCrLf
iJCL = iJCL & """ & DSN & "'""" & vbCrLf
iJCL = iJCL & "You will need to enter your AID and password to view the report." & vbCrLf
iJCL = iJCL & "This report will be deleted in 7 days" & vbCrLf
iJCL = iJCL & "/*" & vbCrLf
iJCL = iJCL & "//"
Set objFSO = CreateObject("Scripting.FileSystemObject"
Set objOTF = objFSO.OpenTextFile(fJCL,2,true)
objOTF.WriteLine(iJCL)
objOTF.Close()
cFTP = drvpath & "ftpcmds.log"
strFTP = "open xxxxx.xxxxx.xx.com" & vbCrLf
strFTP = strFTP & document.Info.id.value & vbCrLf
strFTP = strFTP & document.Info.psw.value & vbCrLf
strFTP = strFTP & "quote site filetype=jes" & vbCrLf
strFTP = strFTP & "put " & """" & fJCL & """" & vbCrLf
strFTP = strFTP & "bye"
Set objOTF = objFSO.OpenTextFile(cFTP,2,true)
objOTF.WriteLine(strFTP)
objOTF.Close()
Set objOTF = Nothing
Set objFSO = Nothing
objSHL.RUN "%COMSPEC% /K ftp -s:""" & cFTP & """ > """& drvpath & """\FTPOUT.LOG",0,False
MsgBox "JOB Submitted"
End Sub
Sub QuitSub
self.Close()
End Sub
</Script>
</Head>
<Body>
<center><h2>Submit a Mainframe Job from the Web</h2></center><hr>
<form name="Info">
Select Division:<select name="Div"><option selected value="0007">0007</option>
<option value="0021">0021</option>
<option value="0950">0950</option>
<option value="ALL">ALL</option>
</select>
Enter Cost Center(ie:06914): <input type="text" name="CC">
Select Date:<select name="Mtd"><option selected value="AACC.D5.DETAIL.JAN03">January 2003</option>
<option value="AACC.K5.DETAIL.JAN03"
ACC.HE.DETAIL.FEB03">February 2003</option>
<option value="AACC.d5.DETAIL.MAR03">March 2003</option>
<option
value="AACC.k5.DETAIL.Mar03">April 2003</option>
<option value="AACC.HE.DETAIL.MAY03">May 2003</option>
<option value="AACC.HE.DETAIL.JUN03">June 2003</option>
<option value="AACC.HE.DETAIL.JUL03">July 2003</option>
<option value="AACC.HE.DETAIL.AUG03">August 2003</option>
<option value="AACC.HE.DETAIL.SEP03">Sep 2003</option>
<option value="AACC.HE.DETAIL.OCT03">October 2003</option>
<option value="AACC.HE.DETAIL.NOV03">November 2003</option>
<option value="AACC.HE.DETAIL.DEC03">December 2003</option>
<option value="AACC.HE.DETAIL.OCT02">October 2002</option>
<option value="AACC.HE.DETAIL.NOV02">November 2002</option>
<option value="AACC.HE.DETAIL.DEC02">December 2002</option>
</select><br>
Enter your ID(ie:xxxxxx): <input type="text" name="id">
Enter your password: <input type="password" name="psw"><br>
Enter an e-mail address: <input type="text" size="45" name="MSGid">Separate multiple e-mail address with a comma<br>
<p>
<Input Type="Button" Name="Submit" Value="Submit" onClick="SubJCL()">
<Input Type="Button" Name="Quit" Value="Quit" onClick="QuitSub()">
</form>
</Body></html>