View previous topic :: View next topic |
Author |
Message |
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Tue May 22, 2007 5:10 pm Post subject: VB to FB |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue May 22, 2007 5:17 pm Post subject: |
|
|
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 |
|
 |
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Tue May 22, 2007 5:29 pm Post subject: |
|
|
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 |
|
 |
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Tue May 22, 2007 7:01 pm Post subject: |
|
|
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.....  |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue May 22, 2007 7:18 pm Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue May 22, 2007 7:23 pm Post subject: |
|
|
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 |
|
 |
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Tue May 22, 2007 7:46 pm Post subject: |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue May 22, 2007 10:47 pm Post subject: |
|
|
Original Poster - the thread starter. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue May 22, 2007 11:09 pm Post subject: |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Wed May 23, 2007 3:34 am Post subject: |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Wed May 23, 2007 3:41 am Post subject: |
|
|
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 |
|
 |
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Tue May 29, 2007 9:52 am Post subject: |
|
|
Hello All,
Thank you very much for all the responses.
Regards
Karun. |
|
Back to top |
|
 |
|
|