Squashing VB records into FB

2008-09-26 Thread Sproull, George CTR DISA GS4B14
Hi,
Is there a native z/OS utility that would take in a file of the
following VB format (for example):

First VB record = |rdw1|record1-40 bytes|
Next  VB record = |rdw2|record2-200 bytes|
Last  VB record = |rdw3|record3-10 bytes|

and output a file in the following FB LRECL=80 format:

First FB record = |rdw1|record1-40bytes|rdw2|record2-(1st 32bytes)|
Next  FB record = |record2-(bytes 33-112)|
Next  FB record = |record2- (bytes 113-192)|
Last  FB record = |record2- (bytes 193-200)|rdw3|record3-10
bytes|padding to 80 char|

In other words, squash the VB records with their RDW fields into spanned
FB records of a given length.

Thanks in advance,
George Sproull
[EMAIL PROTECTED] 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Squashing VB records into FB

2008-09-26 Thread John McKown
On Fri, 26 Sep 2008 11:22:45 -0400, Sproull, George CTR DISA GS4B14
<[EMAIL PROTECTED]> wrote:

>Hi,
>   Is there a native z/OS utility that would take in a file of the
>following VB format (for example):
>
>First VB record = |rdw1|record1-40 bytes|
>Next  VB record = |rdw2|record2-200 bytes|
>Last  VB record = |rdw3|record3-10 bytes|
>
>   and output a file in the following FB LRECL=80 format:
>
>First FB record = |rdw1|record1-40bytes|rdw2|record2-(1st 32bytes)|
>Next  FB record = |record2-(bytes 33-112)|
>Next  FB record = |record2- (bytes 113-192)|
>Last  FB record = |record2- (bytes 193-200)|rdw3|record3-10
>bytes|padding to 80 char|
>
>In other words, squash the VB records with their RDW fields into spanned
>FB records of a given length.
>
>Thanks in advance,
>George Sproull
>[EMAIL PROTECTED]


The following will work, but I doubt that it is what you really want:

//STEP1EXEC  PGM=FTP,
// REGION=0M,
// PARM='(EXIT'
//SYSPRINT DD  SYSOUT=*
//OUTPUT   DD  SYSOUT=*
//INPUTDD  *
127.0.0.1
userid
password
bin
sendsite ; turn off automatic sending of SITE command
site wrap ; wrap the records
locsite rdw ; send the RDW as data
lcd pds.vba255 ; where the member exists
cd pds.cntl ; where we are placing the reformatted member
put $cpu
/*

Note that the "locsite" is needed for the "rdw" parameter. Putting the "rdw"
in the "site" won't work correctly for some reason.

--
John

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Squashing VB records into FB

2008-09-26 Thread John McKown
On Fri, 26 Sep 2008, Sproull, George CTR DISA GS4B14 wrote:

> Hi,
>   Is there a native z/OS utility that would take in a file of the
> following VB format (for example):
> 
> First VB record = |rdw1|record1-40 bytes|
> Next  VB record = |rdw2|record2-200 bytes|
> Last  VB record = |rdw3|record3-10 bytes|
> 
>   and output a file in the following FB LRECL=80 format:
> 
> First FB record = |rdw1|record1-40bytes|rdw2|record2-(1st 32bytes)|
> Next  FB record = |record2-(bytes 33-112)|
> Next  FB record = |record2- (bytes 113-192)|
> Last  FB record = |record2- (bytes 193-200)|rdw3|record3-10
> bytes|padding to 80 char|
> 
> In other words, squash the VB records with their RDW fields into spanned
> FB records of a given length.
> 
> Thanks in advance,
> George Sproull

I posted via the Web interface, but haven't seen it yet. So I'll try 
regular email.

Though not what you'd likely want to do, this can be done using FTP.

//STEP1 EXEC PGM=FTP,PARM='(EXIT'
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//INPUT DD *
127.0.0.1
USERID
PASSWORD
SITE WRAP ; WRAP LONG RECORDS
LOCSITE RDW ; SEND RDWS AS DATA
SENDSITE ; TURN OFF GENERATED SITE COMMAND
SITE LRECL=80 RECFM=FB PRI=? SEC=? CYLINDERS
PUT 'variable.file' 'fixed.file'
/*
//

Note: it is important to use LOCSITE RDW and __not__ SITE RDW. The first 
way works. The second does not work.

-- 
Q: What do theoretical physicists drink beer from?
A: Ein Stein.

Maranatha!
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Squashing VB records into FB

2008-09-26 Thread Tom Marchant
On Fri, 26 Sep 2008 11:22:45 -0400, Sproull, George wrote:

>   Is there a native z/OS utility that would take in a file of the
>following VB format (for example):
>
>First VB record = |rdw1|record1-40 bytes|
>Next  VB record = |rdw2|record2-200 bytes|
>Last  VB record = |rdw3|record3-10 bytes|
>
>   and output a file in the following FB LRECL=80 format:
>
>First FB record = |rdw1|record1-40bytes|rdw2|record2-(1st 32bytes)|
>Next  FB record = |record2-(bytes 33-112)|
>Next  FB record = |record2- (bytes 113-192)|
>Last  FB record = |record2- (bytes 193-200)|rdw3|record3-10
>bytes|padding to 80 char|
>
>In other words, squash the VB records with their RDW fields into spanned
>FB records of a given length.

Not exactly, but what XMIT does is similar.

-- 
Tom Marchant

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Squashing VB records into FB

2008-09-26 Thread Schwarz, Barry A
Does the following come close?

Use IEBGENER to unblock the data.  Now each record has a BDW and
RDW.

FTP the unblocked data in binary to a unix or windows system
that will treat the data as a stream.  Override the DCB so that it is
treated as RECFM=U (so that the BDW and RDW survive intact).

FTP the data back to z/OS in binary specifying RECFM=FB and
LRECL=274 (250 data bytes in each three record set plus 24 bytes for the
three BDW/RDW pairs).

Use DFSORT to split each FB record to four new LRECL=80 FB
records.  First is bytes 5 through 48 and bytes 53 through 88.  Second
is bytes 89 through 168.  Third is bytes 169 through 248.  Fourth is
bytes 249 through 256 and bytes 261 through 274 and 58 bytes of padding.

Frank will probably chime in with a way to do it all at once using only
DFSORT.

-Original Message-
From: Sproull, George CTR DISA GS4B14 
Sent: Friday, September 26, 2008 8:23 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Squashing VB records into FB

Hi,
Is there a native z/OS utility that would take in a file of the
following VB format (for example):

First VB record = |rdw1|record1-40 bytes| Next  VB record =
|rdw2|record2-200 bytes| Last  VB record = |rdw3|record3-10 bytes|

and output a file in the following FB LRECL=80 format:

First FB record = |rdw1|record1-40bytes|rdw2|record2-(1st 32bytes)| Next
FB record = |record2-(bytes 33-112)| Next  FB record = |record2- (bytes
113-192)| Last  FB record = |record2- (bytes 193-200)|rdw3|record3-10
bytes|padding to 80 char|

In other words, squash the VB records with their RDW fields into spanned
FB records of a given length.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Squashing VB records into FB

2008-09-26 Thread Kirk Wolf
John,

Hey, you missed your opportunity to mention Co:Z todsn and fromdsn :-)

// EXEC DTLSPAWN
//INDD  DSN=HLQ.VB.DSN,DISP=SHR
//OUT DD DSN=HLQ.FB.DSN,DISP=(NEW,CATLG),
// DCB=(LRECL=80,RECFM=FB), ..
//STDIN  DD *
   fromdsn //DD:IN -b -l ibmrdw |
   todsn //DD:OUT -b -l none -p 0x00
//

Kirk Wolf
Dovetailed Technologies


On Fri, Sep 26, 2008 at 1:23 PM, John McKown <[EMAIL PROTECTED]> wrote:

> On Fri, 26 Sep 2008, Sproull, George CTR DISA GS4B14 wrote:
>
> > Hi,
> >   Is there a native z/OS utility that would take in a file of the
> > following VB format (for example):
> >
> > First VB record = |rdw1|record1-40 bytes|
> > Next  VB record = |rdw2|record2-200 bytes|
> > Last  VB record = |rdw3|record3-10 bytes|
> >
> >   and output a file in the following FB LRECL=80 format:
> >
> > First FB record = |rdw1|record1-40bytes|rdw2|record2-(1st 32bytes)|
> > Next  FB record = |record2-(bytes 33-112)|
> > Next  FB record = |record2- (bytes 113-192)|
> > Last  FB record = |record2- (bytes 193-200)|rdw3|record3-10
> > bytes|padding to 80 char|
> >
> > In other words, squash the VB records with their RDW fields into spanned
> > FB records of a given length.
> >
> > Thanks in advance,
> > George Sproull
>
> I posted via the Web interface, but haven't seen it yet. So I'll try
> regular email.
>
> Though not what you'd likely want to do, this can be done using FTP.
>
> //STEP1 EXEC PGM=FTP,PARM='(EXIT'
> //SYSPRINT DD SYSOUT=*
> //OUTPUT DD SYSOUT=*
> //INPUT DD *
> 127.0.0.1
> USERID
> PASSWORD
> SITE WRAP ; WRAP LONG RECORDS
> LOCSITE RDW ; SEND RDWS AS DATA
> SENDSITE ; TURN OFF GENERATED SITE COMMAND
> SITE LRECL=80 RECFM=FB PRI=? SEC=? CYLINDERS
> PUT 'variable.file' 'fixed.file'
> /*
> //
>
> Note: it is important to use LOCSITE RDW and __not__ SITE RDW. The first
> way works. The second does not work.
>
> --
> Q: What do theoretical physicists drink beer from?
> A: Ein Stein.
>
> Maranatha!
> John McKown
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Squashing VB records into FB

2008-09-26 Thread John McKown
On Fri, 26 Sep 2008 14:37:56 -0500, Kirk Wolf <[EMAIL PROTECTED]> wrote:

>John,
>
>Hey, you missed your opportunity to mention Co:Z todsn and fromdsn :-)
>
>// EXEC DTLSPAWN
>//INDD  DSN=HLQ.VB.DSN,DISP=SHR
>//OUT DD DSN=HLQ.FB.DSN,DISP=(NEW,CATLG),
>// DCB=(LRECL=80,RECFM=FB), ..
>//STDIN  DD *
>   fromdsn //DD:IN -b -l ibmrdw |
>   todsn //DD:OUT -b -l none -p 0x00
>//
>
>Kirk Wolf
>Dovetailed Technologies
>

OP indicated "native" services, which I took to mean no use of any add-on
packages even if they are free. Also, no writing of own code (which is what
I'd do, personally).

--
John

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Squashing VB records into FB

2008-09-26 Thread Jürgen Kehr

Hello,

you may have a look for the following program, which is a part of SMP/E 
(and therefore available on any system):


GIMDTS: Data transformation service routine

it transforms VB files (and some other) to FB=80 files. The only problem 
might be the retransformation, which normally is done by SMP/E itself, 
but perhaps with some examples one could find the logic behind the 
transformation and build an own retransformation program. 


Sproull, George CTR DISA GS4B14 schrieb:

Hi,
Is there a native z/OS utility that would take in a file of the
following VB format (for example):

First VB record = |rdw1|record1-40 bytes|
Next  VB record = |rdw2|record2-200 bytes|
Last  VB record = |rdw3|record3-10 bytes|

and output a file in the following FB LRECL=80 format:

First FB record = |rdw1|record1-40bytes|rdw2|record2-(1st 32bytes)|
Next  FB record = |record2-(bytes 33-112)|
Next  FB record = |record2- (bytes 113-192)|
Last  FB record = |record2- (bytes 193-200)|rdw3|record3-10
bytes|padding to 80 char|

In other words, squash the VB records with their RDW fields into spanned
FB records of a given length.

Thanks in advance,
George Sproull
[EMAIL PROTECTED] 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

  


--

___



Freundliche Gruesse / Kind regards



Dipl.Math. Juergen Kehr, IT Schulung & Beratung, IT Education + Consulting

Tel.  +49-561-9528788  Fax   +49-561-9528789  Mobil +49-172-5129389

ICQ 292-318-696 (JKehr)



mailto:[EMAIL PROTECTED]

mailto:[EMAIL PROTECTED]

___

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Squashing VB records into FB

2008-09-27 Thread Roger Bolan
To "squash" a dataset into a dataset with LRECL=80, RECFM=FB, BLKSIZE=2120 
use the TSO TRANSMIT (a.k.a. XMIT) command with the OUTDSN keyword.

Instead of actually transmitting the file somewhere else, it will put the 
output into the dataset named in the OUTDSN keyword with those attributes.

To restore the file to it's original format, use the RECEIVE command with 
INDSN.   You name the "squashed" dataset in the INDSN and receive it from 
there as you would a normal RECEIVE.  The DCB attributes will  be taken 
from the INDSN, but you may need to specify SPACE for the received dataset 
if the defaults aren't enough. 

--Roger 




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



Re: Squashing VB records into FB

2008-09-29 Thread Sproull, George CTR DISA GS4B14
Thanks John & all who responded,

This does exactly what I needed. The TSO XMIT was a good idea
too, but I think it put some extra control junk on the front of the
file. The freeware package would have been my next try, but I may not
have been permitted to use that. I agree that the best solution would be
to write something, but this is kind of a proof-of-concept thing so the
FTP to myself will at least give me the right format to start. 

Just trying to drive from the back seat,
George Sproull
  
-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of John McKown
Sent: Friday, September 26, 2008 14:24
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Squashing VB records into FB

On Fri, 26 Sep 2008, Sproull, George CTR DISA GS4B14 wrote:

> Hi,
>   Is there a native z/OS utility that would take in a file of the 
> following VB format (for example):
> 
> First VB record = |rdw1|record1-40 bytes| Next  VB record = 
> |rdw2|record2-200 bytes| Last  VB record = |rdw3|record3-10 bytes|
> 
>   and output a file in the following FB LRECL=80 format:
> 
> First FB record = |rdw1|record1-40bytes|rdw2|record2-(1st 32bytes)| 
> Next  FB record = |record2-(bytes 33-112)| Next  FB record = |record2-

> (bytes 113-192)| Last  FB record = |record2- (bytes 
> 193-200)|rdw3|record3-10
> bytes|padding to 80 char|
> 
> In other words, squash the VB records with their RDW fields into 
> spanned FB records of a given length.
> 
> Thanks in advance,
> George Sproull

I posted via the Web interface, but haven't seen it yet. So I'll try
regular email.

Though not what you'd likely want to do, this can be done using FTP.

//STEP1 EXEC PGM=FTP,PARM='(EXIT'
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//INPUT DD *
127.0.0.1
USERID
PASSWORD
SITE WRAP ; WRAP LONG RECORDS
LOCSITE RDW ; SEND RDWS AS DATA
SENDSITE ; TURN OFF GENERATED SITE COMMAND SITE LRECL=80 RECFM=FB PRI=?
SEC=? CYLINDERS PUT 'variable.file' 'fixed.file'
/*
//

Note: it is important to use LOCSITE RDW and __not__ SITE RDW. The first
way works. The second does not work.

--
Q: What do theoretical physicists drink beer from?
A: Ein Stein.

Maranatha!
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions, send
email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search
the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html