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
 

 

Convert VB dataset to FB dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
bvanilkumar

New User


Joined: 23 Dec 2006
Posts: 10
Location: SYDNEY

PostPosted: Thu May 29, 2008 1:08 pm    Post subject: Convert VB dataset to FB dataset
Reply with quote

Say, i have a VB dataset with data in three lines as shown below.

abcdefghijklm
nopqrstuv
wxyz


Need to create a new dataset with LRECL 10 and RECFM FB using the above dataset. Output should be as mentioned below.

abcdefghij
klmnopqrst
uvwxyz


Can anybody advice how to do this?
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Thu May 29, 2008 2:21 pm    Post subject: Reply to: Convert VB dataset to FB dataset
Reply with quote

what environment...
batch ?
interactive, ISPF EDIT
in this case look at bounds and textflow commands

curious about the business requirement icon_question.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu May 29, 2008 3:47 pm    Post subject:
Reply with quote

You are not converting from VB to FB, you are completely reformatting the data contents.

Dare I ask why ?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu May 29, 2008 4:11 pm    Post subject:
Reply with quote

Hi,

I just re-read the output shown, yes agreed, this is not VB to FB conversion, links provided earlier (removed) might not work for the original question. This is reformatting of records as said earlier & not just a "VTOF" conversion, to fetch some good suggeston you uneed to tell the rules to create the output.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Thu May 29, 2008 6:39 pm    Post subject: Reply to: Convert VB dataset to FB dataset
Reply with quote

when the TS will reply to my questions we will be able to suggest better
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Thu May 29, 2008 7:30 pm    Post subject: Reply to: Convert VB dataset to FB dataset
Reply with quote

since I am in a good mood here is a rexx snippet to reflow some data lines

input is taken from inp. output will be stored to out. reflow size is taken fro fsize

Code:
i     = 0
inp.  = ""
inp.0 = 3
inp.1 = "1234567890xx1qwertyud02cswerty03tytytyty04tytytytytytytytyty"
inp.2 = "jiosjchrevsqwaxdrpn"
inp.3 = "podkopdodod"

j     = 0
out.  = ""
out.0 = 0

fsize = 10
stack = ""

do    99
   
   say  right(length(stack),3) stack
   if   length(stack) < fsize then do
      if i < inp.0 then do
         i = i + 1
         stack = stack || strip(inp.i)
         iterate
      end
      else ,
         leave
   end

   j = out.0 + 1
   out.j = left(stack,fsize)
   out.0 = j
   stack = substr(stack,fsize+1)

end

if length(stack) > 0 then do
   j = j + 1
   out.j = stack
   out.0 = j
end

do j = 1 to out.0
   say right(j,2) right(length(out.j),2) out.j
end

Back to top
View user's profile Send private message
bvanilkumar

New User


Joined: 23 Dec 2006
Posts: 10
Location: SYDNEY

PostPosted: Thu May 29, 2008 8:24 pm    Post subject: Reply to: Convert VB dataset to FB dataset
Reply with quote

Hi,
Let me make my requirement clear.

I have a PS (with RECFM 'U') with 2 lines. First line has data upto record length 27841. Second line has data upto record length 17614

I need to have the full data of the above PS into a new dataset with RECFM 'FB' and LRECL '80'.
i.e. The first line must be retrieved to second dataset with 27841/80 number of lines and second line with 17614/80 lines.

Hope the requirement is clear now.
Please advice.

Thanks,
Anil
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Thu May 29, 2008 8:32 pm    Post subject: Reply to: Convert VB dataset to FB dataset
Reply with quote

I wonder why people are not able to express a clear and complete requirement starting from the first post icon_evil.gif

You started with a ...say... which in common speech means ...
for example, I am just curious, ....

and started requesting something for a vb dataset with short records and very few lines

now You talk about undefined record format with huge records,
and You ask to reflow to fixed lrecl 80...

the record sizes You showed are not divsible by 80
what about the remainder

the two records should be seen as a continuous streams of bytes ??

it meaans that if the last record of the first block is shorter than 80 bytes
should it be filled with bytes from the second record or not??

please make up Your mind and at the third try state clearly Your requirements

but one more question
how did You get a dataset with recfm U to start with ??
usually it is a error when it happens
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2041
Location: Silicon Valley

PostPosted: Thu May 29, 2008 10:24 pm    Post subject: Reply to: Convert VB dataset to FB dataset
Reply with quote

> how did You get a dataset with recfm U to start with ??
> usually it is a error when it happens

In the good old days, I would have just zapped the DSCB to make it FB80.
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: Fri May 30, 2008 1:01 am    Post subject:
Reply with quote

Hello,

It may help if Anil explains what process is going on (or is needed).

The "file" sounds more like a load library than a data file. As was asked before, what created the recfm=u file/data?

Is this some one-time process or will different amounts of data be "input" to future executions? What is the max size of a single group of data that needs to be "re-flowed"? Where did the 2 posted "max-lengths" come from? How might these lengths be known from the data?
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 -> All Other Mainframe Topics 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 To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm


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