In JCL, How do I add "0" padding to a string so that my string length is always 10? I am using TSSUtil v3 tool for jcl.
If input "10541", 5 padding is added = 0000010541
In JCL, How do I add "0" padding to a string so that my string length is always 10? I am using TSSUtil v3 tool for jcl.
If input "10541", 5 padding is added = 0000010541
Here's how you would do it with your SORT product, if you can't get a solution with TSSUTIL:
//STEP001 EXEC PGM=SORT
//SORTIN DD *
24567
1456
47865
24875
1
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,10,UFF,M11,LENGTH=10)
//SYSOUT DD SYSOUT=*
Output
0000024567
0000001456
0000047865
0000024875
0000000001