View previous topic :: View next topic
|
Author |
Message |
kirankumarj
New User
Joined: 18 Dec 2007 Posts: 51 Location: delaware
|
|
|
|
Hi,
I have 100 members in a PDS. I need to add 5 lines at the end of each member.
Can you please help me with the code?
Also,in the 5 lines that i want to add, can i dynamically copy the jobname from the member and add it as the 5th line? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
here is some JCL that might assist.
Code: |
//FILEAID1 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=CSCSGLC.IBM(X),
// DISP=SHR
//DD01O DD DSN=&&JOBNAME,
// DISP=(,PASS),
// UNIT=SYSDA,
// SPACE=(TRK,1),
// DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
** EXTRACT THE JOBNAME
$$DD01 COPY OUT=1,PADCHAR=C' ',
MOVE=(001,8,3)
/*
//*
//**********************************************************************
//*
//FILEAID2 EXEC PGM=FILEAID,
// COND=(0,LT)
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=CSCSGLC.IBM(X),
// DISP=SHR
// DD *
LINE1
LINE2
LINE3
LINE4
/*
// DD DSN=&&JOBNAME,
// DISP=(OLD,DELETE)
//DD01O DD DSN=CSCSGLC.IBM.OUT(X),
// DISP=SHR
//SYSIN DD *
$$DD01 COPY OUT=0
/*
//**********************************************************************
|
Gerry |
|
Back to top |
|
|
kirankumarj
New User
Joined: 18 Dec 2007 Posts: 51 Location: delaware
|
|
|
|
Thank Gerry, for the very quick response.
If you have a minute,could you please guide me furthe.
Does this work only for one member at a time ? If I am not specifying the member name,it is forcing me to.
And even after specifying member name,it gives me RC=8.
DD01 DSN=PROGKKJ.DISB.OUTB.WO489456.JOB(CBDDP297) OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=800,VOL=D1LDA7
DD01O DSN=SYS08018.T104437.RA000.PROGKKJA.JOBNAME.H05 OPENED AS PO,
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=
$$DD01 COPY OUT=1,PADCHAR=C' ',
MOVE=(001,8,3)
BVD01-MEMBER NAME MUST BE SPECIFIED FOR DD01O .
.....SKIPPING TO NEXT $$DD CARD RC=8
0 RECORDS WRITTEN TO DD01O-SYS08018.T104437.RA000.PROGKKJA.JOBNAME.H05
VOL= |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Kirankumarj,
yes it only works for 1 member at a time.
You will need to get a get member list and dynamically generate the JCL to avoid manually creating the JCL.
The error is complaining about the output file DD01O not having a member name.
The first step doesn't need to be a PDS file.
Gerry |
|
Back to top |
|
|
kirankumarj
New User
Joined: 18 Dec 2007 Posts: 51 Location: delaware
|
|
|
|
Thanks Gerry. I will follow the procedure. |
|
Back to top |
|
|
kirankumarj
New User
Joined: 18 Dec 2007 Posts: 51 Location: delaware
|
|
|
|
I just created a macro to add the lines and ran thru for the pds members. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Kirankumarj,
can you share the macro ?
Gerry |
|
Back to top |
|
|
kirankumarj
New User
Joined: 18 Dec 2007 Posts: 51 Location: delaware
|
|
|
|
--------------------------------------------------------------------------------
' This macro was created by the Macro Recorder.
' Session Document: "I:\HOST40\HOST40.EDP"
' Date: Tuesday, January 22, 2008 13:41:00
' User: Kj15567
'--------------------------------------------------------------------------------
' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$
Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
Dim Sessions As Object
Dim System As Object
Set System = CreateObject("EXTRA.System") ' Gets the system object
If (System is Nothing) Then
Msgbox "Could not create the EXTRA System object. Stopping macro playback."
STOP
End If
Set Sessions = System.Sessions
If (Sessions is Nothing) Then
Msgbox "Could not create the Sessions collection object. Stopping macro playback."
STOP
End If
'--------------------------------------------------------------------------------
' Set the default wait timeout value
g_HostSettleTime = 3000 ' milliseconds
OldSystemTimeout& = System.TimeoutValue
If (g_HostSettleTime > OldSystemTimeout) Then
System.TimeoutValue = g_HostSettleTime
End If
' Get the necessary Session Object
Dim Sess0 As Object
Set Sess0 = System.ActiveSession
If (Sess0 is Nothing) Then
Msgbox "Could not create the Session object. Stopping macro playback."
STOP
End If
If Not Sess0.Visible Then Sess0.Visible = TRUE
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
' This section of code contains the recorded events
Sess0.Screen.Copy
Sess0.Screen.Sendkeys("<Tab><Tab><Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Paste
Sess0.Screen.Paste
Sess0.Screen.Sendkeys("C <EndOfField> <Left><Left><Left><Left><Left><Left><Left><Left><Left>XXXXXXXX<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Pf3>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Copy
Sess0.Screen.Sendkeys("<Down><Up><Tab><Tab>E<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Paste
Sess0.Screen.Paste
Sess0.Screen.Sendkeys("C <EndOfField> <Left><Left><Left><Left><Left><Left><Left><Left><Left>XXXXXXXX<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Pf3>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
System.TimeoutValue = OldSystemTimeout
End Sub |
|
Back to top |
|
|
kirankumarj
New User
Joined: 18 Dec 2007 Posts: 51 Location: delaware
|
|
|
|
Just keep recording the actions for 2,3 members and then keep repeating the macro..that is what I did.
There could be a better macro to copy to all the members at once.But I donno. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
That appears to be an ATTCHMATE EXTRA! macro, it would only be usable to someone using that 3270 Emulator. |
|
Back to top |
|
|
kirankumarj
New User
Joined: 18 Dec 2007 Posts: 51 Location: delaware
|
|
|
|
That is correct. We use EXTRA Software. |
|
Back to top |
|
|
|