Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Add 5 lines at the end of each member using FILEAID

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
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    Post subject: Add 5 lines at the end of each member using FILEAID
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: 1703
Location: Australia

PostPosted: Fri Jan 18, 2008 4:15 am    Post subject: Reply to: FILE AID TO ADD MULITPLE LINES
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    Post subject:
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: 1703
Location: Australia

PostPosted: Mon Jan 21, 2008 3:22 am    Post subject: Reply to: Add 5 lines at the end of each member using FILEAI
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    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Wed Jan 23, 2008 3:39 am    Post subject: Reply to: Add 5 lines at the end of each member using FILEAI
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Browsing member from any PDS shiitiizz CLIST & REXX 7 Wed Mar 08, 2017 1:17 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us