|
View previous topic :: View next topic
|
| Author |
Message |
kanipriya
New User
Joined: 20 Sep 2022 Posts: 3 Location: USA
|
|
|
|
Hi,
I have a requirement:
Input file has email id: for ex.,
[email protected]
[email protected]
[email protected]
[email protected]
My output should be :
insert into mail (SEQ ID, MAIL, EMAILID, TEMPLATEID)
values (1234, (mail.nextval), '<email id from input file>', 5376);
In my output everything is unchnanged except email id. Here i need to insert the email id into the output string. I have to do this in jcl. But i am getting spaces after email id as i am taking email address from input file as fixed lenght.
Is there any solution to fit the exact email address into the output?
Please help me on this. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1441 Location: Bamberg, Germany
|
|
|
|
You can use any programming language you like, but not JCL or VSAM. I would think of Sort for example.
What have you tried yourself so far? |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2283 Location: USA
|
|
|
|
1. Please, learn how to post your samples using the Code button:
| kanipriya wrote: |
Hi,
I have a requirement:
Input file has email id: for ex.,
My output should be :
| Code: |
insert into mail (SEQ ID, MAIL, EMAILID, TEMPLATEID)
values (1234, (mail.nextval), '<email id from input file>', 5376);
|
In my output everything is unchnanged except email id. Here i need to insert the email id into the output string. I have to do this in jcl. But i am getting spaces after email id as i am taking email address from input file as fixed lenght.
Is there any solution to fit the exact email address into the output?
Please help me on this. |
2. There is absolutely no way to do it in JCL. Period.
3. The "insertion" of a record can be done in VSAM using existing VSAM files (but not using sequential files as you are dealing with). This is absolutely different issue from what you need to achieve. Period.
4. Please, choose any other of 100500 available tools you are familiar with? If there is any tool familiar to you, the job can be done in minutes.
If no such tool is available. I suggest you to start RTFM.
Hint: start reading about SORT tools (DFSORT, or SYNCSORT)
You can also use REXX, or COBOL, or C/C++, or Java-Python-etc. or many-many other tools you are able to use.
5. Your topic is titled "Inserting variable length into output file"
FYI: "variable length" is a numeric value.
It is not clear, how do you need to "insert" any numeric value "into output file"?
The content of your topic doesn't match its title. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|