IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JCL to create a new fomatted file from a input file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prashant tyagi

New User


Joined: 26 Apr 2013
Posts: 3
Location: india

PostPosted: Wed May 21, 2014 12:13 pm
Reply with quote

Hi All,

I am new to this forum writing but I got one situation where I have to create a new formatted flat file which will take input from another file.

Now this input data are seprated from a single space like below
Code:
123 ABC DEF 54C 897-2345........
234 ERFGD PQRES 69D 420........and so on


I need the result file which will have data in formatted manner like below..

Code:
123 ABC      DEF     54C 897-2345   
234 ERFGD  PQRES 69D 420...............


Please suggest.

Thanks in advance.

Code'd
Back to top
View user's profile Send private message
prashant tyagi

New User


Joined: 26 Apr 2013
Posts: 3
Location: india

PostPosted: Wed May 21, 2014 12:45 pm
Reply with quote

It did not come out correctly...the desired output is below(where _ is for spaces in mainframe)

123 ABC__ DEF__ 54C 897-2345 and so on
234 ERFGD PQRES 69D 420_____ and so on

Thanks
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed May 21, 2014 12:53 pm
Reply with quote

Since you have posted in the JCL forum, can we assume you want to use SyncSort to do this?

If so, you want to look at PARSE in the manual and find examples of its use. You need something very simple, as you have nothing complex to identify the different elements, and then all you need to do is make them a fixed size.

To keep the spacing you require when formatting a post, highlight the text and click the Code button. Or manually type the opening
Code:
 tag, and the closing
.
Back to top
View user's profile Send private message
prashant tyagi

New User


Joined: 26 Apr 2013
Posts: 3
Location: india

PostPosted: Wed May 21, 2014 1:10 pm
Reply with quote

Thanks Bill for the suggestion..let me try this and yes I needed one JCL for this icon_smile.gif
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed May 21, 2014 7:10 pm
Reply with quote

I've actually become demoralized by the "Can JCL do this" question.

I figured after a few years, people would know better, and start calling it a "batch utility" or something better than "a JCL."
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 21, 2014 7:47 pm
Reply with quote

Hi Ed,
Quote:

I've actually become demoralized by the "Can JCL do this" question.
I figured after a few years, people would know better, and start calling it a "batch utility" or something better than "a JCL."
Unfortunately, new students/freshers are still being taught this is ok.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed May 21, 2014 9:18 pm
Reply with quote

Ed Goodman wrote:
I've actually become demoralized by the "Can JCL do this" question.

I figured after a few years, people would know better, and start calling it a "batch utility" or something better than "a JCL."

Which has resulted in the irascible posts of the general tone, "No, you can't do it with 'JCL'; you can use any of the following utilities, and when decide which of them to use, we'll give you advice and help, but until you learn the difference, you're out of luck".
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu May 22, 2014 7:07 pm
Reply with quote

I think my issue comes from the fact that it's a constant stream of new programmers. My introverted world view sees this board as kind of a person, and I just kind of expected them to 'get it' by now.

It's like throwing sand in the wind though, nothing sticks, nothing stays, no one looks back and sees the pile of information laying right there at their feet. They just throw a new question out like it's the first time.

There was a series of commercials for a telephone company called Vonage. The hook was showing a huge pile of crumpled up phone bills and then a person would stand there and crumple up their phone bill and throw it on the pile. That's what it's like now.

I mean, this isn't the fresher board. I expect it there.

www.youtube.com/watch?v=azDCNPAHWLg
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu May 22, 2014 7:13 pm
Reply with quote

There are places where they still call JCL as a "Language"
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri May 23, 2014 12:41 am
Reply with quote

Well, the L in JCL is for Language - it is just that it is not a progamming language.

I regard my run decks as a memo from me to the OS - please Mr OS, do these things for me. The JCL does nothing itself - it simply transfers the request.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri May 23, 2014 1:06 am
Reply with quote

Ed Goodman wrote:
I think my issue comes from the fact that it's a constant stream of new programmers. My introverted world view sees this board as kind of a person, and I just kind of expected them to 'get it' by now.

ISTR a post stating that being a senior member of this board is like being a second grade teacher. Most of the students do learn, grow, and move on...but every year, there's a new crop of second graders.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top