meetsrk
New User
Joined: 13 Jun 2004 Posts: 85
|
|
|
|
Below are the two fields i have in a file.
Code: |
123456890 => Postions
010 099
030
030 099
099
010 099
010 010
|
My Output shud be,
If Column B > Spaces then Print Column B else Print Column A
So exact output will be,
Code: |
099
030
099
099
099
010
|
Pls let me know how can i achieve this using Sort. |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(6,3,CH,NE,C' '),BUILD=(6,3)),
IFTHEN=(WHEN=NONE,BUILD=(1,3))
/*
|
|
|