Help needed!!!!!!!!!!!!

Joined
Apr 3, 2014
Messages
16
:eek:
Hi all,

I have a script like this:
************************************************************************************************

//GPFBASP DD DSN=PHGP.GPFBASP.BAS.KSDS,DISP=SHR
//HKAGTMS DD DSN=PHGP.AGENT.HKAGTMS,DISP=SHR
//GPFFEUP DD DSN=PHGP.GPFPWO1.PWO.ESDS,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
2070412 00005900
2070531 00006000
0010000 00006100
0001000 00006200
/*
//STEP002 EXEC PGM=FTP
//FILE01 DD DSN=PHGP.GPFPWO1.PWO.ESDS,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPEN HKGBMPF.AP.MANULIFE.COM 00007000
NOLOG *****Dummy Member Include*****************************************
CD ON REQUEST OUTPUTS 00007200
PUT %FILE01,ESDS,FB,200,200 FRC_EXT_&YYYY&MM&DD..TXT 00007300
ASCII 00007400
/*
//* 0000780
//STEP003 EXEC PGM=IDCAMS
//FILE1 DD DSN=PHGP.GPFPWO1.PWO.ESDS,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
//*
//* *** (Unsupported) **** $$ EOJ
//
//STEP006 EXEC PGM=FTP
//FILE03 DD DSN=PHGP.GPFMKT2.MKT.ESDS,DISP=SHR
//FILE04 DD DSN=PHGP.GPFMKT4.MKT.ESDS,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPEN HKGSPADD.AP.MANULIFE.COM 00020900
NOLOG *****Dummy Member Include*****************************************
ASCII 00021100
PUT %FILE01,ESDS,FB,80,80 CXX_TRIAL4_ELIGIBLE_PAC_PAP.CSV 00021200
PUT %FILE02,ESDS,FB,86,86 CXX_TRIAL4_WORK_ELIGIBLE_PAC_PAP.DAT 00021300
BYE 00021400
/*
//* 0002180
//STEP008 EXEC PGM=FTP
//FILE05 DD DSN=PHGP.GPFPWO1.PWO.ESDS,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPEN HKGBMPF.AP.MANULIFE.COM 00007000
NOLOG *****Dummy Member Include*****************************************
CD ON REQUEST OUTPUTS 00007200
PUT %FILE01,ESDS,FB,200,200 FRC_EXT_&YYYY&MM&DD..TXT 00007300
ASCII 00007400
/*
//*
************************************************************************************************

Now I need a macro which will look for Program = FTP (PGM=FTP) and it will copy and paste the next few lines until another step starts in a column Or the VBA will seperate the DSN NAME, copy the next part after OPEN statement and the remaining lines untill a new step starts or the EOF as displayed here in different columns.And I am going to use this for multiple files in a folder so if you can help me it would be awesome

Warm Regards,

Subhra
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top