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
 

 

how to copy from a particular line
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
swarnasuneel

New User


Joined: 20 Apr 2012
Posts: 20
Location: chennai

PostPosted: Mon May 21, 2012 8:02 pm    Post subject: how to copy from a particular line
Reply with quote

In one of my file its (spool report job).it extracts all the tables there is a report of the summary of the tables in the file.my req is to copy the summary report to a excel sheet.can any one provide solution..
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon May 21, 2012 8:06 pm    Post subject: Re: how to copy from a particular line
Reply with quote

swarnasuneel wrote:
In one of my file its (spool report job).it extracts all the tables there is a report of the summary of the tables in the file.my req is to copy the summary report to a excel sheet.can any one provide solution..


How is your doubt related to topic ??
Please eloborate.
Back to top
View user's profile Send private message
swarnasuneel

New User


Joined: 20 Apr 2012
Posts: 20
Location: chennai

PostPosted: Mon May 21, 2012 8:08 pm    Post subject:
Reply with quote

I want to copy the report from ps to excel .if possible
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon May 21, 2012 8:15 pm    Post subject:
Reply with quote

Try to create a Ps file having comma seprated values
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon May 21, 2012 8:19 pm    Post subject:
Reply with quote

Quote:
I want to copy the report from ps to excel .if possible
Of course it is possible, depending upon a few definitions.

1. If you want to copy the sequential file on the mainframe to an excel worksheet on the mainframe, you have two choices: (1) if your site does not have one, purchase one of the products for the mainframe that can generate Excel code and run your file through it, or (2) spend a year (or two) converting the 1000+ page file specification that Microsoft provides for Excel files into code to generate your own Excel worksheet on the mainframe.

2. If you merely want to be able to access the data in Excel, your best bet is to convert the sequential file into a comma-delimited file, download that to a PC running Excel, and let Excel convert the comma-delimited file into a worksheet.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Mon May 21, 2012 8:19 pm    Post subject:
Reply with quote

swarnasuneel,
What you can do is to format output file to CSV and later FTP so that it can be opened with excel. Is that what you want to do?

Please post sample input and expected output along with RECFM/LRECL for the input file. Also provide rules for processing and rules to identify target records (how to identify table name etc).

Thanks,
Back to top
View user's profile Send private message
swarnasuneel

New User


Joined: 20 Apr 2012
Posts: 20
Location: chennai

PostPosted: Mon May 21, 2012 9:14 pm    Post subject:
Reply with quote

in my file it contains the data as like below

xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxx
vvvvvvvv
bbbbb
processing options;
tablename rows

abc 4523
def 523

before processing thereis some data we want to copy from the processing options to the o/p.the o/p may be a notepad or excel file.can we copy a file to notepad from a specified pont???pls help me
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Mon May 21, 2012 9:20 pm    Post subject:
Reply with quote

swarnasuneel,
Nothing is possible until you explain the rules.

Sorry but I have no idea what you are trying to explain with your posted sample input data and words like "some data".

Thanks,
Back to top
View user's profile Send private message
swarnasuneel

New User


Joined: 20 Apr 2012
Posts: 20
Location: chennai

PostPosted: Mon May 21, 2012 9:35 pm    Post subject:
Reply with quote

sorry,
in my file data is like this

jobxxxx cputime 196.0 total elapsed time 200.8

//nxxxxx job,class
//step1
//
//
relationships
processing options
table name noof rows
tab1 9018
tab2 2000

my thing i want to copy to the output from the point where 'processing options' starts in the file.To a notepad or excel..
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Mon May 21, 2012 9:46 pm    Post subject:
Reply with quote

Quote:
To a notepad or excel


Decide which there is a big difference!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 21, 2012 9:48 pm    Post subject:
Reply with quote

Hello,

Suggest you try to implement as was mentioned earlier. . .
Quote:
Try to create a Ps file having comma seprated values
Actually, you would probably NOT use commas, but someother character that will not appear in the data (i.e. a backslash "\" or a tilde "~")

Once the file has been created, pull it from the mainframe to the pc using ftp (or download it to a remote ftp server).
Back to top
View user's profile Send private message
swarnasuneel

New User


Joined: 20 Apr 2012
Posts: 20
Location: chennai

PostPosted: Mon May 21, 2012 9:49 pm    Post subject:
Reply with quote

To a notepad.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 21, 2012 9:52 pm    Post subject:
Reply with quote

Hello,

There is NO notepad on the mainframe. . .

You need to pay attention. . . .

Create the delimited file and download it to the pc.

Then it can be opened in notepad or anything else. It is directly usable by Excel.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon May 21, 2012 10:22 pm    Post subject:
Reply with quote

I have assumed how your input data should be and have got the output in CSV format and all you need to do is FTP or send this output file as attachment in CSV format so that you would be able to see the output as reading an excel

Code:
//IN        DD *
  JOBXXXX CPUTIME 196.0 TOTAL ELAPSED TIME 200.8
  //NXXXXX JOB,CLASS
  //STEP1
  //
  //
  RELATIONSHIPS
  PROCESSING OPTIONS
  TABLE NAME NOOF ROWS
  TAB1 9018
  TAB2 2000
//OUT       DD  DSN=&C2,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//OUT2      DD  SYSOUT=*
//TOOLIN    DD *
  COPY FROM(IN) USING(CTL1)
  COPY FROM(IN) USING(CTL2)
  COPY FROM(OUT) TO(OUT2) USING(CTL3)
//CTL1CNTL  DD *
  INREC FIELDS=(1,80,SEQNUM,8,ZD,START=1)
  OUTFIL FNAMES=CTL2CNTL,
  INCLUDE=(3,18,CH,EQ,C'PROCESSING OPTIONS'),
  OUTREC=(C' OUTFIL FNAMES=OUT,STARTREC=',81,8,80:X)
//CTL2CNTL DD DSN=&C1,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//CTL3CNTL DD *
    INREC  IFTHEN=(WHEN=(3,18,CH,EQ,C'PROCESSING OPTIONS'),
           OVERLAY=(13:C',')),
          IFTHEN=(WHEN=(3,44,CH,EQ,C'TABLE NAME NOOF ROWS'),
           OVERLAY=(13:C',')),
          IFTHEN=(WHEN=(7,1,CH,EQ,C' '),OVERLAY=(7:C','))
                  SORT FIELDS=COPY
                  OUTREC FIELDS=(1,80)

/*



This is a tested code

Output is


Code:
  PROCESSING,OPTIONS
  TABLE NAME,NOOF ROWS
  TAB1,9018
  TAB2,2000


You might need to change your input and control statements accordingly

There are experts who can produce much better results provided you were able to frame your doubt properly

Also the sort is much simpler when you produce the report as comma seperated value
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 21, 2012 11:05 pm    Post subject:
Reply with quote

Hello,

Just keep in mind that if the data might contain a(ny) comma(s), using a comma for the delimiter will fail when the data is processed on the pc. . .
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon May 21, 2012 11:23 pm    Post subject:
Reply with quote

Agreed Dick
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon May 21, 2012 11:37 pm    Post subject: Reply to: how to copy from a particular line
Reply with quote

Also, rather than having to shift the data with JCL statements to the right, you can consider using DD DATA, like this example.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon May 21, 2012 11:39 pm    Post subject:
Reply with quote

Thanks Bill icon_smile.gif
Back to top
View user's profile Send private message
hailashwin

New User


Joined: 16 Oct 2008
Posts: 73
Location: Boston

PostPosted: Tue May 22, 2012 2:34 pm    Post subject:
Reply with quote

Please forgive my ignorance, but I wonder why a simple FTP from the mainframe would involve delimiting the file unless asked to.

Even if we would need to, for a notepad, wouldnt it be advisable to use X'05' instead of a comma as you would have the file 'tab' delimited after the download.
Please correct me if am wrong.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 22, 2012 7:10 pm    Post subject:
Reply with quote

Hello,

Please note the "final destination" is Excel - which works better with a delimited file rather than a plain text file. With a delimited file the import into a Win-product (i.e. Excel) is basically automatic.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts How to copy Tape dataset to unix main... chaky All Other Mainframe Topics 4 Fri Jul 08, 2016 2:52 am


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