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

Need help on SORT card?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vinuk2009

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Sat Oct 02, 2010 12:59 pm
Reply with quote

Hi,
I have a file with LRECL 300 and FB. it is a flat file. Presently in the 90th position sign (i.e. '-') is there for some records and some records are strated which don't have sign in 90th position. I need to insert space or '+' in 90th position for all the records which don't have '-' and the column shold strat in 91st position. same like this I need to do in 114 th position, 150th position in same file. Could some one please let me know is it possible using sort?
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: Sat Oct 02, 2010 8:03 pm
Reply with quote

Hello,

Post some sample input and the output you want from the sample input. These do not need to be full-length records, just enough to show your requirement. Post the rules needed to get from the nput to the output.

Mention the dsorg and lrecl of the files.
Back to top
View user's profile Send private message
vinuk2009

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Sun Oct 03, 2010 12:08 pm
Reply with quote

Hi Dick,

here is the example


Input file


Code:
90 91 92 ..........114 115 116 ....................150 151 153........... cols

1  0  0  .............-      1   0    ....................2      0    0   ...........
-   2  0  ............2      0   0    ....................-       1    0   ..........
3  0  0  .............-      2   0    ....................-       2    0  ...........

Ouptut file

Code:
90 91 92 93 .......114 115 116 117...............150 151 152 153..........

+   1  0  0    .......-       1   0         ...............+       2    0     0  ..........
-    2  0       ........+      2   0   0   ................-        1    0        ..........
+   3  0  0   ........-        2   0        ................-       2    0        ..........


DSORG = PS and LRECL =300 and RECFM = FB
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sun Oct 03, 2010 12:48 pm
Reply with quote

please learn to use the tags ( code tag in this case )
they will keep the data You enter aligned and make things easier for people willing to help
and using the preview button before the submit one will let You see what Your post will look like

I edited Your post to let You see what it looks like,
please repost just the file part properly aligned and I will cleanup everything after that
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sun Oct 03, 2010 1:37 pm
Reply with quote

follow on
I reformatted in a more ( IMHO ) readable fashion

Input file
Code:

0 0 0 0 ... 1 1 1 1 ... 1 1 1 1 .......... cols
9 9 9 9 ... 1 1 1 1 ... 5 5 5 5 .......... cols
0 1 2 3 ... 4 5 6 7 ... 0 1 3 4 .......... cols


1 0 0 . ... - 1 0 . ... 2 0 0 . .......... data
- 2 0 . ... 2 0 0 . ... - 1 0 . .......... data
3 0 0 . ... - 2 0 . ... - 2 0 . .......... data

Ouptut file

Code:

0 0 0 0 ... 1 1 1 1 ... 1 1 1 1 .......... cols
9 9 9 9 ... 1 1 1 1 ... 5 5 5 5 .......... cols
0 1 2 3 ... 4 5 6 7 ... 0 1 3 4 .......... cols


+ 1 0 0 ... - 1 0 B ... + 2 0 0 .......... data
- 2 0 B ... + 2 0 0 ... - 1 0 B .......... data
+ 3 0 0 ... - 2 0 B ... - 2 0 0 .......... data

do You realize that You will lose the previous content of columns 93,117,154 ?

unless You shift everiyhing and change the column accordingly
Back to top
View user's profile Send private message
vinuk2009

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Sun Oct 03, 2010 6:34 pm
Reply with quote

Hi Enrico,

Thank you for reformating my data. I tried to reformat before post. But I didn't get success. Going forward I will follow your suggestion.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sun Oct 03, 2010 7:12 pm
Reply with quote

the best way to format correctly is to edit/build the post in an editor with a fixed font ( without using tabs )
and after that cut and paste into the forum reply box

I hope I reformatted correctly,

but You still have to answer the question about shifting or overlaying
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top