Formatting Input Using JCL ......!!



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Formatting Input Using JCL ......!!

Postby mj025 » Thu Oct 30, 2014 12:29 pm

HI all,

I have a input PS file that is in the following format that is
aaaaaaa aaaaaa  ssssssssss    9999999999
bbbbb bbbbb ssssssss      9999994555     
bbbbbbb bbbbbb ssssssssss    9999994556 
ccccccc cccccc ssssss        9999994557 


The output should look like
aaaaaaa aaaaaa   | ssssssssss   |   9999999999
bbbbb bbbbb       |  ssssssss     |  9999994555     
bbbbbbb bbbbbb |   ssssssssss  |  9999994556 
ccccccc cccccc    |   ssssss       | 9999994557


is this can be achivied by JCL.This can be done through Cobol Program approach also.I need a JCL approach if possible .............?


Thanks in advance

Code'd
mj025
 
Posts: 11
Joined: Fri Jun 13, 2014 2:29 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Formatting Input Using JCL ......!!

 

Re: Formatting Input Using JCL ......!!

Postby mj025 » Thu Oct 30, 2014 12:51 pm

This could be the formatted output .

AAAAAAA AAAAAA | SSSSSSSSSS  | 9999999999 9999
BBBBB B        | SSSSSSSS    | 9999994555     
BBBBBBB B      | SSSSSSSSSS  | 9999994556     
CCCCCCC CC     | SSSSSS      | 9999994557     
mj025
 
Posts: 11
Joined: Fri Jun 13, 2014 2:29 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Formatting Input Using JCL ......!!

Postby Aki88 » Thu Oct 30, 2014 2:23 pm

Hello,

No, you can not achieve the requested o/p through 'JCL' as such; though you can run a utility/utilities through JCL to achieve the requested o/p.
One of the utilities you can try is DFSORT/SYNCSORT (depending on the product your shop supports).

If you choose to use DFSORT, and you know the column in which you need the pipes (example, column 16 and then 30 from the displays you've shared), you can use a simple OUTFIL BUILD statement to fulfill the requirement; have a look at the DFSORT programming guide (if you have DFSORT at your site) or search the forum for OUTFIL BUILD, there are innumerous examples explaining it.

Regards.

These users thanked the author Aki88 for the post:
mj025 (Tue Nov 04, 2014 11:35 am)
Aki88
 
Posts: 371
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 35 times

Re: Formatting Input Using JCL ......!!

Postby BillyBoyo » Thu Oct 30, 2014 5:11 pm

You need to re-show your input, within the Code tags to preserve spacing and use the Preview button so see what the post will look like, then Submit.

If your input is fixed, as Aki88 has said it is a simple BUILD (on INREC, OUTREC or OUTFIL) perhaps even an OVERLAY.

If your data starts in variable positions, you will need to PARSE.

These users thanked the author BillyBoyo for the post:
mj025 (Tue Nov 04, 2014 11:35 am)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Formatting Input Using JCL ......!!

Postby mj025 » Tue Nov 04, 2014 11:29 am

Hi,
thanx Aki88 and BillyBoyo for your replies
your correct Aki88 we can do that using Build,overlay for fixed length records.
But i don't know the lengths of each record it may vary,so as BillyBoyo said i has to do it using PARSE but don't know it's function read some IBM manuals
BillyBoyo please explain me PARSE for this input or any example if possible or any useful manuals etc...

Thanx
mj025
 
Posts: 11
Joined: Fri Jun 13, 2014 2:29 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Formatting Input Using JCL ......!!

Postby BillyBoyo » Fri Nov 07, 2014 6:31 pm

Sorry, missed this one.

You can find all the manuals here, choose the ones for your version of DFSORT: http://www-01.ibm.com/support/docview.wss?uid=isg3T7000080

There is a Getting Started Guide, and an extensive Application Programming Guide. Both of these will explain PARSE.

You will also find examples of PARSE if you search here.

If you get stuck, show what you've tried and the problem you are having, and someone will assist.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post