MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VB to FB

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Tue May 22, 2007 5:10 pm    Post subject: VB to FB Reply with quote

Hi,

I have a VB file with the following attributes.

LRECL 256
Block 6233

I need to convert to a FB file with the below attributes. I do not mind truncating data from the source file ( VB ) from position 123 to 256. This is the position reference i see when i give COLS in VB file. The data in the VB file is from postion 1 to 122 only.

The FB file attributes are :-

LRECL 122

Apprciate your any help in this regard !

Thanks
Karun.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 22, 2007 5:17 pm    Post subject: Reply with quote

karunkallore,

1. Please follow board rules. You have been a member on this site for nearly 4 years and yet you cannot follow the rules

2. Post your question in the right forum

Last but not least SEARCH before posting. Search the forums for VTOF and you will find the answer you are looking for

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Tue May 22, 2007 5:29 pm    Post subject: Reply with quote

Hi Kolsu,

I apologise for my mistake. Since i was experimenting with PL/I I posted this question in Application Programming forum. Also I searched for "VB to FB" strings and couple of other permutations and could not get any relevant hit.

Thanks for guiding me. Will keep search with more string variants before posting.

Regards,
Karun.
Back to top
View user's profile Send private message Send e-mail
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Tue May 22, 2007 7:01 pm    Post subject: Reply with quote

kolusu wrote:
2. Post your question in the right forum
I'm sure you have seen this before and have a vista that is much clearer than mine, but when is reformating records not a potential programming problem?
Quote:
Last but not least SEARCH before posting. Search the forums for VTOF and you will find the answer you are looking for
I'm sure you've BTDT & got the Tee-shirt, but not all of us know about the cryptic keywords of some of the sort utilities..... Embarassed
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue May 22, 2007 7:18 pm    Post subject: Reply with quote

CICSGuy,

Quote:

I'm sure you've BTDT & got the Tee-shirt, but not all of us know about the cryptic keywords of some of the sort utilities


Please read Kolusu's reply again (Don't get offended)
1. He wants users to put in some effort before asking repeated questions.
2. He gives direction as to what to look for. He doesn't expect you to search for the particular keyword VTOF. That was his suggestion.

Quote:

I'm sure you have seen this before and have a vista that is much clearer than mine, but when is reformating records not a potential programming problem?

These kind of reformatting things are most often performed using some utility. OP never mentioned that he is playing around with PL/1 - that makes me to remind of another rule Don't make people guess. Give as much info as you can

+We maintain a separate set of threads "Technical FAQ (Tips)". Most of the repeatedly asked questions are already covered here.
http://www.mvsforums.com/helpboards/viewtopic.php?t=5336

Please make use of the FAQs

Thanks,
Phantom
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 22, 2007 7:23 pm    Post subject: Reply with quote

Quote:

I'm sure you have seen this before and have a vista that is much clearer than mine, but when is reformating records not a potential programming problem?

CICS Guy,

potential problem? hmm IMHO writing fixed/variable block files is a basic 101 cobol question. And the unwritten rule is that "writing a cobol pgm" is the last option which no one really wants to do it.

Quote:

I'm sure you've BTDT & got the Tee-shirt, but not all of us know about the cryptic keywords of some of the sort utilities.....


A simple search for "variable fixed " would also yield the similar results. I just pointed to the actual keyword so that the search is narrowed to the right topic.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Tue May 22, 2007 7:46 pm    Post subject: Reply with quote

Phantom wrote:
Please read Kolusu's reply again (Don't get offended)
1. He wants users to put in some effort before asking repeated questions.
2. He gives direction as to what to look for. He doesn't expect you to search for the particular keyword VTOF. That was his suggestion.
No offense....
kolusu wrote:
Last but not least SEARCH before posting. Search the forums for VTOF and you will find the answer you are looking for
As an initial offering, I'd agree, but, that was an admonishment. But like he said:
kolusu wrote:
You have been a member on this site for nearly 4 years and yet you cannot follow the rules
maybe it was a valid admonishment.
Phantom wrote:
These kind of reformatting things are most often performed using some utility. OP never mentioned that he is playing around with PL/1
To those that tend to use programming to solve problems, maybe those that grew up in an era where the "utilities" did not have the length and breath of range that many have now, this kind of reformatting is not a "utility" solution.
BTW, why would be thinking that "OP" (BTW, what does "OP" stand for?) might be "playing around with PL/1"?
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue May 22, 2007 10:47 pm    Post subject: Reply with quote

Original Poster - the thread starter.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue May 22, 2007 11:09 pm    Post subject: Reply with quote

CICSguy,

Quote:

BTW, why would be thinking that "OP" (BTW, what does "OP" stand for?) might be "playing around with PL/1"?


This is what OP (original poster) said in his last note
Quote:

Since i was experimenting with PL/I I posted this question


He never mentioned whether he is looking for a solution in COBOL or PL/I or any other programming language or any utility in his first note. He just gave us the VB and FB LRECLs and BLKsizes - nothing more.

Thanks,
Phantom
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Wed May 23, 2007 3:34 am    Post subject: Reply with quote

Anyway, in PL/1 just declare your input file as FB and your output file as VB with a RECSIZE of 4 bytes greater than your record variable storage and let pl/1 handle the intricacies. You only play with your data. Gets more complicated when you start playing with LOCATE mode though! Then YOU have to sort out your record lengths.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Wed May 23, 2007 3:41 am    Post subject: Reply with quote

Sorry - made a mess of that!
Code:

DCL vbfile FILE RECORD OUTPUT ENV(TOTAL RECSIZE(reclen) VB);
DCL reclen FIXED BIN(31) INIT(0);

DCL record_variable CHAR(80); /* say */

record_variable = 'some data';
reclen = LENGTH(record_variable);
WRITE FILE (vbfile) FROM (record_variable);

as modified from my book
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Tue May 29, 2007 9:52 am    Post subject: Reply with quote

Hello All,

Thank you very much for all the responses.

Regards
Karun.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group