View previous topic :: View next topic
|
Author |
Message |
Charles Wolters
New User
Joined: 30 Mar 2011 Posts: 48 Location: United States
|
|
|
|
Every quarter we receive a data set (fixed block, record length = 1200) and using SAS we read just the first 400 characters. My group leader informed that there is another division that may have need of these data sets but they would have need of the data in characters 401 through 1200. He asked me to prepare a listing of the contents of positions 401 through 1200 for the first 200 records.
This is a straightforward task in SAS but the question of how to accomplish this task using an IBM tool or utility is picking at my brain. Could someone give me a starting point?
Charles Wolters |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
If I had to do this without SAS, I'd use IEBGENER to put the last 800 bytes into a new data set (temporary, probably) and then use a second IEBGENER step to copy the short records to a SYSOUT data set. IEBGENER's GENERATE and RECORD statements allow you to work with areas of data within records. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Code: |
OPTION COPY
INREC BUILD=(401,800) |
|
|
Back to top |
|
|
Charles Wolters
New User
Joined: 30 Mar 2011 Posts: 48 Location: United States
|
|
|
|
Thank you Robert and Bill,
First, I was unaware that IEBGENER allows one to work with areas within the record. I have used DFSORT on occasion but never thought about using the COPY option.
Charles Wolters |
|
Back to top |
|
|
|