Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with script thatl pulls data from the mainframe via the web

Status
Not open for further replies.

sharntxs

Technical User
Jun 4, 2003
1
US
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=&quot;AACC.D5.DETAIL.JAN03&quot;>January 2003</option>
<option value=&quot;AACC.K5.DETAIL.JAN03


<HTML>
<HEAD>
<TITLE>Submit xxxxxx xxxxx Report Request</TITLE>
<HTA:APPLICATION ID:&quot;objxxxReport&quot; APPLICATIONNAME=&quot;xxxxxReport&quot; SCROLL=&quot;no&quot; SINGLEINSTANCE=&quot;yes&quot; WINDOWSTATE=&quot;normal&quot;>


<SCRIPT LANGUAGE=&quot;VBScript&quot;>

Sub SubJCL

Set objSHL = CreateObject(&quot;WScript.Shell&quot;)
Set WshSysEnv = objSHL.Environment(&quot;PROCESS&quot;)
drvpath = WshSysEnv(&quot;SystemDrive&quot;) & WshSysEnv(&quot;HOMEPATH&quot;) & &quot;\&quot;
DSN = &quot;xxxxxxx.ITF.OUTPUT.D&quot; & DatePart(&quot;yyyy&quot;,now) & DatePart(&quot;m&quot;,now) & DatePart(&quot;d&quot;,now) & &quot;.T&quot; & DatePart(&quot;h&quot;,now) & DatePart(&quot;m&quot;,now) & DatePart(&quot;s&quot;,now)

If len(document.Info.CC.value) < 1 then
MsgBox &quot;You must enter a valid cost center&quot;
Exit Sub
End If

If len(document.Info.CC.value) < 5 then
MsgBox &quot;The cost center must be 5 digits long&quot;
Exit Sub
End If

If len(document.Info.id.value) < 1 then
MsgBox &quot;You must enter an ID&quot;
Exit Sub
End If

If len(document.Info.psw.value) < 1 then
MsgBox &quot;You must enter a password&quot;
Exit Sub
End If

If len(document.Info.MSGid.value) < 1 then
MsgBox &quot;You must enter an e-mail address&quot;
Exit Sub
End If


fJCL = drvpath & &quot;ftpjcl.txt&quot;
iJCL = &quot;//ITFIN JOB '3,6961,,,X5522,4,SNC ','Sxxxxx',REGION=1024K,&quot; & vbCrLf
iJCL = iJCL & &quot;// MSGCLASS=W,NOTIFY=xxxxx,TIME=78&quot; & vbCrLf
iJCL = iJCL & &quot;//*MAIN USER=DACCSAB,CLASS=IMSAP&quot; & vbCrLf
iJCL = iJCL & &quot;//JOBLIB DD DSN=CC.MS.PLIB1,DISP=SHR&quot; & vbCrLf
iJCL = iJCL & &quot;//STEP1 EXEC PGM=B2DET101&quot; & vbCrLf
iJCL = iJCL & &quot;//SYSOUT DD SYSOUT=*&quot; & vbCrLf
iJCL = iJCL & &quot;//SYSUDUMP DD SYSOUT=*&quot; & vbCrLf
iJCL = iJCL & &quot;//DETAIL DD DSN=&quot; & document.info.Mtd.value & &quot;,DISP=SHR&quot; & vbCrLf
iJCL = iJCL & &quot;//REPORT DD DSN=&quot; & DSN & &quot;,&quot; & vbCrLf
iJCL = iJCL & &quot;// DISP=(NEW,CATLG,DELETE),UNIT=SPACE,&quot; & vbCrLf
iJCL = iJCL & &quot;// SPACE=(TRK,(500,100)),DCB=(LRECL=133,RECFM=FBA,BLKSIZE=27930),&quot; & vbCrLf
iJCL = iJCL & &quot;// RETPD=7&quot; & vbCrLf
iJCL = iJCL & &quot;//DIVCC DD *&quot; & vbCrLf
iJCL = iJCL & document.Info.Div.value & document.Info.CC.value & vbCrLf
iJCL = iJCL & &quot;/*&quot; & vbCrLf
iJCL = iJCL & &quot;//STEP2 EXEC BJMSG&quot; & vbCrLf
iJCL = iJCL & &quot;//SYSIN DD *&quot; & vbCrLf
iJCL = iJCL & &quot;FROM=SHR1,PSW=cop5&quot; & vbCrLf
iJCL = iJCL & &quot;MSG 3 6961 M2I&quot; & vbCrLf
iJCL = iJCL & &quot;To: &quot;& document.info.MSGid.value & vbCrLf
iJCL = iJCL & &quot;Fr: xxxxx&quot; & vbCrLf
iJCL = iJCL & &quot;Re: xxxxx&quot; & vbCrLf & vbCrLf
iJCL = iJCL & &quot;Please view your report request @&quot; & vbCrLf
iJCL = iJCL & &quot;&quot;&quot; & DSN & &quot;'&quot;&quot;&quot; & vbCrLf
iJCL = iJCL & &quot;You will need to enter your AID and password to view the report.&quot; & vbCrLf
iJCL = iJCL & &quot;This report will be deleted in 7 days&quot; & vbCrLf
iJCL = iJCL & &quot;/*&quot; & vbCrLf
iJCL = iJCL & &quot;//&quot;


Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set objOTF = objFSO.OpenTextFile(fJCL,2,true)
objOTF.WriteLine(iJCL)
objOTF.Close()

cFTP = drvpath & &quot;ftpcmds.log&quot;
strFTP = &quot;open xxxxx.xxxxx.xx.com&quot; & vbCrLf
strFTP = strFTP & document.Info.id.value & vbCrLf
strFTP = strFTP & document.Info.psw.value & vbCrLf
strFTP = strFTP & &quot;quote site filetype=jes&quot; & vbCrLf
strFTP = strFTP & &quot;put &quot; & &quot;&quot;&quot;&quot; & fJCL & &quot;&quot;&quot;&quot; & vbCrLf
strFTP = strFTP & &quot;bye&quot;

Set objOTF = objFSO.OpenTextFile(cFTP,2,true)
objOTF.WriteLine(strFTP)
objOTF.Close()
Set objOTF = Nothing
Set objFSO = Nothing

objSHL.RUN &quot;%COMSPEC% /K ftp -s:&quot;&quot;&quot; & cFTP & &quot;&quot;&quot; > &quot;&quot;&quot;& drvpath & &quot;&quot;&quot;\FTPOUT.LOG&quot;,0,False
MsgBox &quot;JOB Submitted&quot;

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=&quot;Info&quot;>
Select Division:<select name=&quot;Div&quot;><option selected value=&quot;0007&quot;>0007</option>
<option value=&quot;0021&quot;>0021</option>
<option value=&quot;0950&quot;>0950</option>
<option value=&quot;ALL&quot;>ALL</option>
</select>

Enter Cost Center(ie:06914): <input type=&quot;text&quot; name=&quot;CC&quot;>
Select Date:<select name=&quot;Mtd&quot;><option selected value=&quot;AACC.D5.DETAIL.JAN03&quot;>January 2003</option>
<option value=&quot;AACC.K5.DETAIL.JAN03&quot;
ACC.HE.DETAIL.FEB03&quot;>February 2003</option>
<option value=&quot;AACC.d5.DETAIL.MAR03&quot;>March 2003</option>
<option
value=&quot;AACC.k5.DETAIL.Mar03&quot;>April 2003</option>
<option value=&quot;AACC.HE.DETAIL.MAY03&quot;>May 2003</option>
<option value=&quot;AACC.HE.DETAIL.JUN03&quot;>June 2003</option>
<option value=&quot;AACC.HE.DETAIL.JUL03&quot;>July 2003</option>
<option value=&quot;AACC.HE.DETAIL.AUG03&quot;>August 2003</option>
<option value=&quot;AACC.HE.DETAIL.SEP03&quot;>Sep 2003</option>
<option value=&quot;AACC.HE.DETAIL.OCT03&quot;>October 2003</option>
<option value=&quot;AACC.HE.DETAIL.NOV03&quot;>November 2003</option>
<option value=&quot;AACC.HE.DETAIL.DEC03&quot;>December 2003</option>
<option value=&quot;AACC.HE.DETAIL.OCT02&quot;>October 2002</option>
<option value=&quot;AACC.HE.DETAIL.NOV02&quot;>November 2002</option>
<option value=&quot;AACC.HE.DETAIL.DEC02&quot;>December 2002</option>

</select><br>

Enter your ID(ie:xxxxxx): <input type=&quot;text&quot; name=&quot;id&quot;>&nbsp; &nbsp;
Enter your password: <input type=&quot;password&quot; name=&quot;psw&quot;><br>
Enter an e-mail address: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=&quot;text&quot; size=&quot;45&quot; name=&quot;MSGid&quot;>Separate multiple e-mail address with a comma<br>
<p>
<Input Type=&quot;Button&quot; Name=&quot;Submit&quot; Value=&quot;Submit&quot; onClick=&quot;SubJCL()&quot;>
<Input Type=&quot;Button&quot; Name=&quot;Quit&quot; Value=&quot;Quit&quot; onClick=&quot;QuitSub()&quot;>
</form>
</Body></html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top