IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Add 5 lines at the end of each member using FILEAID


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Fri Jan 18, 2008 1:17 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jan 18, 2008 4:15 am
Reply with quote

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
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Fri Jan 18, 2008 9:16 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Jan 21, 2008 3:22 am
Reply with quote

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
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Mon Jan 21, 2008 8:55 pm
Reply with quote

Thanks Gerry. I will follow the procedure.
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Wed Jan 23, 2008 2:57 am
Reply with quote

I just created a macro to add the lines and ran thru for the pds members.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Jan 23, 2008 3:39 am
Reply with quote

Hi Kirankumarj,

can you share the macro ?


Gerry
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Wed Jan 23, 2008 10:15 pm
Reply with quote

--------------------------------------------------------------------------------
' 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
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Wed Jan 23, 2008 10:16 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Jan 23, 2008 10:50 pm
Reply with quote

That appears to be an ATTCHMATE EXTRA! macro, it would only be usable to someone using that 3270 Emulator.
Back to top
View user's profile Send private message
kirankumarj

New User


Joined: 18 Dec 2007
Posts: 51
Location: delaware

PostPosted: Thu Jan 24, 2008 4:19 am
Reply with quote

That is correct. We use EXTRA Software.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Searching for a member but don't know... TSO/ISPF 6
No new posts Looking For a PDS Member Without Open... PL/I & Assembler 10
No new posts I need a 4 lines block where substrin... DFSORT/ICETOOL 12
Search our Forums:

Back to Top